From the looks of the swaps proc;

ubuntu:~$ cat /proc/swaps
Filename                Type        Size    Used    Priority
/dev/sdc2                               partition   4104188 0   -1

And from top:

ubuntu:~$ top

top - 09:35:37 up  9:07,  9 users,  load average: 1.43, 0.80, 1.09
Tasks: 206 total,   3 running, 202 sleeping,   0 stopped,   1 zombie
Cpu(s):  4.4%us,  2.2%sy,  0.0%ni, 50.5%id, 42.5%wa,  0.0%hi,  0.3%si,  0.0%st
Mem:   3088492k total,  2619440k used,   469052k free,   238536k buffers
Swap:  4104188k total,        0k used,  4104188k free,  1769788k cached

Both say that zero swap is actually being used.

I'm using a 64bit capable core2 duo dell laptop with 4gigs of ram running 32bit ubuntu precise on a persistent live USB stick.

I may be answering my own question but I wonder if the liveUSB stick nature of the environment is somehow related...

Let me know if you need more information.

  • 1
    Why do you want to use swap?.. it's only going to slow things down... – Uri Herrera Aug 12 '12 at 0:52
  • 2
    I've never seen my system use any swap file at all (I also have 4 GB). – Marty Fried Aug 12 '12 at 1:40
  • @UriHerrera, I wanted to put it on a separate drive because I thought it was already being used but .... it appears that it was never being used in the first place and everything was being loaded into ram.... I don't get though why it was so slow. ... I since then moved my .cache and .mozilla folders to a separate drive creating sym links for them and that seems to make things a lot snappier.. don't know why the screen dims when I have 4gigs of ram and no swap being used on a core 2 duo O_o – Joshua Robison Aug 12 '12 at 10:48

Swap is kind of a "safety net" in case you run out of RAM, so the fact that it's not used until actually needed is entirely normal.

You're not using any swap because all the processes fit in your RAM. You won't actually see swap being used util processes actually need more space. Try opening a lot of tabs on your browser, or install the stress tool which you can use to stress your system's memory, and you will see swap being used.

  • The thing is, if swap is not being used than I shouldn't be seeing slowness. But I'm getting a lot of seemingly memory related slowness. You know when unity/compiz effects dim the screen from memory overload... but if it is all in ram than things should be snappy... so swap must be getting used.... no? – Joshua Robison Aug 12 '12 at 2:14
  • 1
    If swap is not being used, then it's not memory related. You can try turning off swap temporarily to see how things feel(sudo swapoff -a), or play with "swappiness" which decides how much your system will use the swap file (askubuntu.com/questions/103915/how-do-i-configure-swappiness). – roadmr Aug 13 '12 at 0:06

Well I have a system-indicator that seems to disagree with the above statements.
Firefox being my greatest offender, it does not want to play nice with others, but I have since been using Opera browser and I have less of a memory problem.

I am only guessing by behavior, but it seems FF wants to keep cache even after being closed. I have been told because you might want it again..da!..probably not!

Perhaps the old stuff could go to swap instead hogging my cache so other app's run slow. I was told forcing a cache clean would only run my CPU and load up, but I don't see this happening, and if it does maybe only for a fraction of a second.

Too often I have to clean my cache just so I can use something along with the browser, say Dropbox or Filezilla..ridiculous!


    sudo sync && sudo sysctl -w vm.drop_caches=3

Also why not have choice about things I don't use like Evolution this and that and that resource hog! Tracker and goa-daemon or some stupid inductor to tell me I am using my English keyboard. Bi-lingual should be a selection during setup if you want it..not a memory resident option!
I use root edit to edit /etc/xdg/autostart files and remove or change to

NoDisplay=true or display= true

or in bulk (careful)

    cd /etc/xdg/autostart/
    sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop

Then just uncheck the ones you don't want in Startup Applications RE: How do I add/remove the "hidden" startup applications?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.