Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My system freezes quite often when run out of memory, I have 2GB and using netbeans, chrome, firefox and a few other apps this is consumed completely. Seems to me since I upgraded to ubuntu natty.

ubuntu natty current

uname -a
2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 athlon i386 GNU/Linux

from /etc/fstab

UUID=7f3586b2-14c3-455c-a5bd-7adbc8174589 /srv            xfs     defaults        0       2
/dev/sda2       none            swap    sw              0       0

I tried setting

sysctl vm.swappiness=100

but no effect. It' always like:

It looks always like that:

Every 2,0s: free -m                                         Wed Jul 13 20:20:26 2011

             total       used       free     shared    buffers     cached
Mem:          1758       1697         61          0         55        633
-/+ buffers/cache:       1008        750
Swap:            0          0          0

What can I do to test if my swap works?

share|improve this question
    
Step 1: Add some swap. –  womble Jul 13 '11 at 23:46

1 Answer 1

up vote 4 down vote accepted

From what it looks like in your output, you have no swapspace at all active in this system.

Have you formatted your swap volume /dev/sda2 using the mkswap command?

If you run 'swapon -a' and then do a free -m, does it show any swap space?

The swappiness parameter will not do anything if you have no swap space of course.

share|improve this answer
    
Seems I havent read exactly the output of free... no swap at all! No idea why it wasn't setup in installation procedure - or maybe there was a prob on dist upgrade to natty. Thx for your hint mdpc; After swapon -a it, I see my 8393M swap space. Where do I have to edit to make it activated on boot? –  groovehunter Jul 14 '11 at 6:18

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.