August 23, 201113 yr cache_dirs will not make use of the swap file. The memory for caching the dirents will be free'ed probably before being swapped out. A swap file would help with applications that need large amounts of ram. Possibly something like mysql, torrent server. slimserver, mt-daap. and it will only come into play for memory blocks that are hardly accessed and when the system needs memory for something else. It would also come into play "IF" for example you mounted a large TMPFS on /var/log. or /var. Then the syslog would be written to tmpfs and if there was a need for ram, it would be swapped out safely. The rootfs will not swap out to the swap file. tmpfs will. For an unRAID server with 4GB, I doubt a swap file will bring much use unless you want put /var on tmpfs, run a large slimserver, mysql server, etc, etc. For example, here is a top of my workstation. top - 06:31:38 up 61 days, 23:07, 13 users, load average: 1.35, 0.93, 0.90 Mem: 12302916k total, 12175260k used, 127656k free, 564108k buffers Swap: 3919776k total, 424k used, 3919352k free, 10481068k cached I have 3 very active Vmware machines and loads of windows running and it's been up for 2 months without rebooting.
August 23, 201113 yr I should add that if you are going to do virtualization on your unRAID server, vmware, virtualbox, etc, etc, then it makes sense to carve out a good chunk of space for swap. In this case I would recommend it and if I were doing virtualization I would do it. (just to be on the safe side).
August 23, 201113 yr Author Thanks for all the replies. I guess a few gig's of HD space on the cache drive is cheap insurance
Archived
This topic is now archived and is closed to further replies.