Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
Last edited by acid_kewpie; 11-29-2008 at 03:52 AM.
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 ...
Not that much RAM. What kernel are you running on your computer? It would be intereting to see what your swap usage is during running Linux. Does your distro have usage graphs?
Distribution: Mac OS X 10.6.4 "Snow Leopard", Win 7, Ubuntu 10.04
Posts: 322
Rep:
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.
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.
The general rule of thumb for swap is twice your RAM. So if you have 256Mb of RAM, assign 512MB for swap.
And what if you need to run a program that takes up 769MB of memory space? There is no cut and dried answer for how much swap space, though it is clearer with smaller memory footprints and slow processors. Still, it depends on what you're going to use the machine for. I would question the decision to run 256MB on a machine with this much disk storage. Memory is too cheap, anymore, to diddle around with 256MB of RAM; unless you're pretty sure that's all you'll need. In which case, you'd already know what your swap requirements would be.
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.
And what if you need to run a program that takes up 769MB of memory space?
With 256MB RAM "running" a program that needs 769 is
wishful thinking ... crawling (grinding?) may describe
it, personally I'd stay clear of the program ;}
With 256MB RAM "running" a program that needs 769 is
wishful thinking ... crawling (grinding?) may describe
it, personally I'd stay clear of the program ;}
That was kinda the point of my whole diatribe. Desktop machines using a lot of swap equals misery. It doesn't matter whether it's 2 times RAM or 1 times RAM, it's still misery. We just don't do the sort of things on our desktop that they were doing when this 2 times RAM rule of thumb was the mainstay.
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.
Desktop machines using a lot of swap equals misery. It doesn't matter whether it's 2 times RAM or 1 times RAM, it's still misery. We just don't do the sort of things on our desktop that they were doing when this 2 times RAM rule of thumb was the mainstay.
It is not necessarily the case that "using a lot of swap equals misery".
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.