What should be the ideal memory amount for swap?
Hi members,
This is my first post in this forum. I have a small question. In my institution computer, which is dual booting system with windowsXP, when I have installed fedora core 6 with a memory 2048 MB allocated to swap it seems to be very very slow in response in comparision to the earlier situation when it was allocated to be 1024 MB although in the earlier case total memory allocated for LINUX was also less. This time it is in total 36 GB, out of which I have allocated 512 MB to /boot, 10000 MB to /root, 2048 MB to <swap> and rest to /usr. The RAM is 256 MB. Is the sluggishness due to the memory allocation problem or something else ? Windows XP is running with normal speed. -SKD |
256mb is probably the main reason it's horrible, certainly the disk space is completely irrelevant, and actual amount of swap shouldn't matter. run "free -m" to show the current usage of memory, the more swap being used, the slower your system is going to run.
|
Hi,
And welcome to LQ! More than twice the amount of RAM for swap is unusual, to say the least. But I can't imagine it being more sluggish with 2048 than it was with 1024 (unless you were experiencing many OOM-killers with the smaller SWAP).... Of course, I've got no idea what FC's memory requirements are at all ... Cheers, Tink |
Quote:
|
With only 256 MB of RAM, you may want to try a lighter distro such as puppy or at least switch to a lighter desktop such as Xfce instead of Gnome (Fedora default) or KDE. That should give you a nice speed boost.
|
You might also try opening a terminal and running "top", perhaps first running "man top" to get an idea what top shows.
There are lighter window managers, but puppy or vectorlinux or some other built for small capacity or older systems might give better results. |
The general rule of thumb for swap is twice your RAM. So if you have 256Mb of RAM, assign 512MB for swap.
And don't be discouraged by the amount of RAM. I run GNOME just fine on 256MB and it runs quite well, even with basic compositing. KDE however, is another story. |
Quote:
The important thing to remember about swap is that it's slow: bone crushingly, boringly, bang your head against the wall slow. If your machine is swapping, the answer is not likely to be to add more swap space. |
Quote:
wishful thinking ... crawling (grinding?) may describe it, personally I'd stay clear of the program ;} |
Quote:
|
Lots of ram requirement.
Running a laptop with 196megs ram and a 256meg swap. Running something that uses that much memory on the laptop would grind it to a halt ( 400mhz processor + 196 ram and slow hard drive ) but if i need to recompile openoffice or something i just create a temporary file for swapping.
Laptop runs genome ( stripped ) or kde full pretty well. Basically if you now that you need more swap then make it a little bigger than the normal 2xmemory. If you only need lotsa ram occasionally would just create a temporary swap and use that too till you finish. If this doesn't get your system where you want it could try a lighter distro or strip down the one that you are using. |
Just for comparision, your RAM is about a thousand times faster than your harddisk.
|
Quote:
What equals misery, to use your phrase, is having lots of traffic to and from swap, so, in the case that you have several programs that are primarily held inactive in the background, the use of some swap may not be that bad for the performance of the apps that are in the foreground. (Not exactly good either, just not causing an appreciable additional slowdown.) Of course, the performance will decrease when you have to get things back from swap, but there are special cases in which this can be easily tolerable. But I agree with the general thrust of this thread that the rule of thumb for swap, back from the days in which 8 M of ram was an expensive thing, and the only people who had 16 were doing really high powered stuff (albeit slowly), is just useless these days. If the OP really wants help in getting the computer to run more smoothly (as oppsed to just getting random "Well now I now what I should of done so that Linux would be faster than Windows, as it should be" excuses) then there will have to be real information here; as mentioned, a 'top' result would be a good start, as would some information on what you are trying to do and info on what/when exactly it runs slowly. |
Thank you guys for all of your response. I actually have been very busy with some training work and presently out of station. I would analyse the situation after returning. I know that 256 MB RAM is not good and using a high memory demanding software is difficult with it. Actually I wanted to know that whether it becomes slower by just allotting more space to SWAP. At my home Ihave 512 MB RAM and it is working fine even on KDE desktop. Here I have allocated 1024 MB to SWAP.
-SKD |
All times are GMT -5. The time now is 01:28 AM. |