Swap Chop

Discussion topics, Linux related - not requests for help

Moderators: ChrisThornett, LXF moderators

Swap Chop

Postby heiowge » Sun Feb 17, 2013 12:35 pm

I have 2 main machines. The basic specs of both are listed in my signature. What I want to know is... Do I really need a Swap partition on either? If so, will altering the swappiness help, and what is better for me, more swappiness or less?

Thanks

Swap partitions are 4GB and 1GB I think...
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 17.1 MATE and Win7


HP mini, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 17 MATE
User avatar
heiowge
LXF regular
 
Posts: 1906
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby towy71 » Sun Feb 17, 2013 1:15 pm

A swap partition is necessary if you intend to hibernate or suspend either machine, I have 2Gb ram and 4Gb swap on my desktop and 1 Gb ram with 2Gb on my netbook
still looking for that door into summer
User avatar
towy71
Moderator
 
Posts: 4276
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales

Postby heiowge » Sun Feb 17, 2013 3:04 pm

Then that would be a no. I only ever shut down, restart or log out.
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 17.1 MATE and Win7


HP mini, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 17 MATE
User avatar
heiowge
LXF regular
 
Posts: 1906
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby nelz » Sun Feb 17, 2013 3:47 pm

Linux expects to have swap available, even if it doesn't use it, although some services page startup code to swap purely because it is not needed once the service is running.

As to how much you need and how swappy it should be, that depends on what you use the system for.

Code: Select all
free -m


will show how much real and swap memory you are using. Generally a lower swappiness setting gives a more responsive system when there is RAM to spare.

If you are so short of disk space that you are considering repartitioning your drive to reclaim an extra 1GB, you should be more concerned about filesystem fragmentation that swap.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby heiowge » Sun Feb 17, 2013 5:30 pm

*****@*****-desktop ~ $ free -m
total used free shared buffers cached
Mem: 14034 7464 6569 0 128 6197
-/+ buffers/cache: 1138 12896
Swap: 3813 0 3813

That surprised me. I had no idea I was using half my RAM! :shock: I'm only running KDE, Firefox, Transmission and konsole.

I'm not worried. I have plenty of space. I was looking to speed up my netbook and (more importantly) my daughter's netbook. I heard a rumour that Swap doesn't help if you've got enough ram. Both netbooks have 2GB RAM, mine DDR3, hers DDR2. I had thought they were using at most about 1.5GB, since that's all my RAM clocks seem to show.
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 17.1 MATE and Win7


HP mini, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 17 MATE
User avatar
heiowge
LXF regular
 
Posts: 1906
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby heiowge » Sun Feb 17, 2013 5:40 pm

Hmmm...

Why does the system monitor show a usage of 1.1GB and free -m show about 7 times that? :?
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 17.1 MATE and Win7


HP mini, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 17 MATE
User avatar
heiowge
LXF regular
 
Posts: 1906
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby nelz » Sun Feb 17, 2013 7:12 pm

Buffers and caches, look at the next line in the output of free.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK


Return to Discussion

Who is online

Users browsing this forum: No registered users and 0 guests