Q about swap size

Konstantin Svist fry.kun at gmail.com
Sun Jul 11 19:01:24 UTC 2010


  On 07/11/2010 09:10 AM, Robert G. (Doc) Savage wrote:
> I've been running Fedora on my old Thinkpad A22p (P-III/M w/512MB) 
> since FC4 or before, upgrading from one version to the next using the 
> same partition sizes. For F13 I increased the size of /boot, but kept 
> swap at 1GB:
>
>     # fdisk -l /dev/sda
>
>     Disk /dev/sda: 120.0 GB, 120034123776 bytes
>     255 heads, 63 sectors/track, 14593 cylinders
>     Units = cylinders of 16065 * 512 = 8225280 bytes
>     Sector size (logical/physical): 512 bytes / 512 bytes
>     I/O size (minimum/optimal): 512 bytes / 512 bytes
>     Disk identifier: 0x000304c6
>
>         Device Boot      Start         End      Blocks   Id  System
>     /dev/sda1   *           1          64      512000   83  Linux
>     Partition 1 does not end on cylinder boundary.
>     /dev/sda2              64       14463   115658752   83  Linux
>     /dev/sda3           14463       14594     1048576   82  Linux swap / Solaris
>
> The last couple of releases have run agonizingly slowly with very high 
> load averages (between 2.x and 10.x).
>
> I just read 
> http://docs.fedoraproject.org/en-US/Fedora/13/html/Installation_Guide/s2-diskpartrecommend-x86.html
> which recommends a minimum of 2GB swap size for memory sizes up to 
> 4GB. I've been using 2x RAM for swap size ever since the 2.6 kernel 
> was introduced. At the moment (running 'yumex') 'top' indicates:
>
>     top - 10:43:15 up 2 days, 6 min,  5 users,  load average: 8.62, 6.84, 6.26
>     Tasks: 244 total,   7 running, 237 sleeping,   0 stopped,   0 zombie
>     Cpu(s): 60.7%us, 23.5%sy,  9.2%ni,  0.0%id,  0.0%wa,  5.4%hi,  1.3%si,  0.0%st
>     Mem:    509800k total,   502624k used,     7176k free,    16280k buffers
>     Swap:  1048568k total,   317372k used,   731196k free,   101944k cached
>
> This indicates only about 30% of my 1GB swap is being used. Would 
> increasing that to 2GB have any affect on the load average performance?
>
> --Doc Savage
>   Fairview Heights, IL 


Don't run Gnome/KDE desktops - they're memory hogs. Instead, try XFCE - 
it's much lighter and faster (fewer features, though).
You have ~800MB of virtual memory used (mem used+swap used) with nothing 
but yumex.
I have Thunderbird and Firefox and several small programs open; my virt 
memory usage is at ~600MB. The rest of my 2G is buffers and caches.

Mem:   2061244k total,  1999948k used,    61296k free,   303296k buffers
Swap:        0k total,        0k used,        0k free,   917156k cached


As far as swap, keep it at 1G, it's a reasonable setting with your hardware.
With my 2G RAM, I have the swap partition at 2G, but keep it turned off 
most of the time -- the programs I open rarely, if ever, fill up the 2G 
and it's faster to not use the swap when you don't need it. But that's 
just me, not a recommendation of any kind :)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20100711/91bf11bb/attachment.html 


More information about the users mailing list