Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

From the looks of the swaps proc;

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

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.

share|improve this question
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

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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
    
awesome! Thanks roadmr –  Joshua Robison Aug 13 '12 at 1:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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