Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-29-2008, 01:37 AM
|
#1
|
|
Member
Registered: Nov 2008
Posts: 45
Rep:
|
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
|
|
|
|
11-29-2008, 01:53 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,691
|
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.
|
|
|
|
11-29-2008, 01:53 AM
|
#3
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
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
|
|
|
|
11-29-2008, 07:55 PM
|
#4
|
|
Member
Registered: Aug 2008
Posts: 107
Rep:
|
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?
|
|
|
|
11-29-2008, 08:14 PM
|
#5
|
|
Member
Registered: Jan 2004
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.
|
|
|
|
11-29-2008, 08:41 PM
|
#6
|
|
Senior Member
Registered: Jun 2008
Posts: 1,631
Rep: 
|
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.
|
|
|
|
11-29-2008, 09:05 PM
|
#7
|
|
Member
Registered: Oct 2008
Posts: 41
Rep:
|
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.
|
|
|
|
11-29-2008, 09:27 PM
|
#8
|
|
Senior Member
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,153
Rep: 
|
Quote:
Originally Posted by mohaas05
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.
|
|
|
|
11-29-2008, 11:16 PM
|
#9
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
Quote:
Originally Posted by Quakeboy02
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 ;}
|
|
|
|
11-30-2008, 12:08 AM
|
#10
|
|
Senior Member
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,153
Rep: 
|
Quote:
Originally Posted by Tinkster
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.
|
|
|
|
11-30-2008, 12:44 AM
|
#11
|
|
Member
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906
Rep:
|
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.
Last edited by Hern_28; 11-30-2008 at 12:46 AM.
|
|
|
|
11-30-2008, 02:38 AM
|
#12
|
|
Senior Member
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028
Rep:
|
Just for comparision, your RAM is about a thousand times faster than your harddisk.
|
|
|
|
11-30-2008, 04:04 AM
|
#13
|
|
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,670
|
Quote:
Originally Posted by Quakeboy02
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.
|
|
|
|
12-07-2008, 04:22 AM
|
#14
|
|
Member
Registered: Nov 2008
Posts: 45
Original Poster
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:04 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|