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.

I am running 64 bit ubuntu 12.04 on HP Envy Spectre ultrabook, with 4GB of RAM. I have been running into problems with python code which uses RAM very inefficiently, see e.g. here, causing my code to crash. I have increased the swap partition to 8 GB, but crashes still happen. How far can I take it with resizing my swap? 16 GB? 32 GB? At which point will ubuntu be unable to handle it?

Thanks!

share|improve this question
    
You may have a problem with the RAM. Have you tested your RAM? –  Mitch Mar 22 at 8:40
    
Yes, I do run the memory test occasionally, not found any problems. Are there any other tests I could run? –  nikosd Mar 22 at 17:16
    
Which tests have you ran? If you haven't, you can try Memory Check. –  Mitch Mar 22 at 17:55
    
I occasionally run the built-in memtest86 during boot up, it finds no problems. I also tried the dd/md5 checksum method from your link -all checksums agreed. Also checked memester: no problems, although I am unsure how far I should push it. It doesn't find any problem in tests with up to 2 GB chunks. I guess it's safe to conclude it's not the RAM? –  nikosd Mar 23 at 0:28

1 Answer 1

up vote 2 down vote accepted

I don't think it really matters. However, if you're using multiple memory intensive applications, you can allocate as big a partition as you want for swap. How much will be used is another question entirely. Depends on the system.

Personally I don't see any need for a swap partition size larger than twice the amount of ram, not to exceed 8GB. Having such a huge swap, the swapping process will be probably much less effective.

share|improve this answer

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.