Author Topic: Swap Image On A Ramdrive  (Read 1970 times)

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Swap Image On A Ramdrive
« on: February 03, 2005, 08:43:10 am »
I was browsing looking for info on the preload application stuff that comes with Qtopia.

And found this article: How to use RAM as swap

Please try not start a flame war here, this is not the goal of my post. If you have some theory about why it is usefull or not please add your comments there.
(This is to somehow limit the extent of the war as I'm going to shoot first  )

I'm myself a bit surprised that such a thing could work but I would like to know if anybody tried this on his Z and if it has brought  are some performance improvment or not.

I tried a little bit just now, and plan to do a bit more testing but I can't say I've seen any difference.

The only thing that is perhaps usefull is that Linux seems to use the swap as soon as there is one and not only when memory is full (if I understand cat /proc/meminfo enough). So that if you create a swap file on an sd card, Linux will start writing on it whatever you do.  So by creating a swapfile in a ramdrive with a higher priority in a ramdrive and a second one with a lower priority somewhere on flash maybe the second one will be used only when needed.   (untested).

anway I have added another point to my post counter
SLC-860 cacko / senao wifi

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Swap Image On A Ramdrive
« Reply #1 on: February 03, 2005, 09:29:22 am »
I don't think any of the zaurus models contain enough RAM for this to make any difference.

The scenarios listed in the article are all for 512MB+ RAM, while my little old C760 has a whopping 64MB.

In the case of the Z any RAM you use to make a RAM-drive for swap would just decrease the RAM available before swap needed to be used.

It might make sense if you had 1GB+ RAM, but with the RAM available on the Z I can't imagine anyway in which it would help.

On my desktop I have 512MB RAM with a 400MB swap partition, I've currently got firefox with 15 tabs open, thunderbird open and I'm compiling glibc caues I just updated my linux-headers. free -mt shows
Quote
             total       used       free     shared    buffers     cached
Mem:           503        487         15          0        134        224
-/+ buffers/cache:        129        374
Swap:          488          0        487
Total:         991        488        503

and /proc/meminfo tells me I'm using
Quote
SwapCached:  592 kB

Can't imagine how giving up RAM for faster Swap would benefit me.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card