Quote:
Originally Posted by lazlow
The old rule of thumb on swap still applies(2 x Ram = swap size).
|
Yuck!
The old rule of thumb on swap never applied. Badly selecting swap size rarely does much harm, so lots of people can be satisfied with a basically useless rule of thumb.
Where the swap size actually matters (as seems to be the case here) you ought to make a better guess than that about what it ought to be.
On the topic of this thread, we don't know:
1) Whether the real problem actually is too little swap space. It looks like that on the surface, but error messages don't always tell you what the real problem is.
2) Does it needs more swap space because the task being attempted really needs so much or
2a) Some other task(s) are idling in the background using up swap space or
2b) A j switch or similar error is making the task need more than it ought to need.
3) If that task really needs so much memory and a big swap file would make it work, how big?
4) If that task would need a very big swap file, then will that cause it to run so slowly that it isn't worth doing.
That rule of thumb I hate is a crude attempt at controlling for question 4. If a task needs a swap file more than double ram size, probably it will run so slowly it isn't worth running. But maybe it won't run that slowly or maybe it's worth a lot to you and you would run it even if it took a week to finish. So the rule of thumb still has virtually no value.
Anyway, taking a most probable collection of guesses through all the above unknowns, since it doesn't get very far with 500Mb of ram and 510Mb of swap, odds are it won't finish with 500Mb of ram and 1000Mb of swap.
If you aren't seriously short of disk space, the next logical step is a 3Gb swap area. Then see:
If it works, great.
If it fails right away, something else is wrong.
If it keeps running and doesn't finish, poke around with top and/or similar tools to see how bad things are.
Needing more than 3Gb of swap (from where you started) would clearly mean something else is fundamentally broken. But needing more than 1000Mb of swap is likely (given what you already know) and doesn't mean that more won't work well.