My newly installed FC2 systems is running a lot slower than I expected. I chose the "default" partitioning scheme suggested during installation. And fdisk now reports this as:
# fdisk -l
Disk /dev/hda: 41.1 GB, 41174138880 bytes 255 heads, 63 sectors/track, 5005 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 4981 39905460 83 Linux /dev/hda3 4982 5005 192780 82 Linux swap
Isn't that around 188 Meg of swap space? My system has 128 Meg of memory, and in the past I seem to remember allocation about four times as much swap space as I had physical memory, with better results.
Am I nuts? Does swap space only need to be the size of physical memory? I don't really understand the issues here. Advice?
-Mike
Am Sa, den 30.10.2004 schrieb Mike Witt um 17:47:
My newly installed FC2 systems is running a lot slower than I expected. I chose the "default" partitioning scheme suggested during installation. And fdisk now reports this as:
Isn't that around 188 Meg of swap space? My system has 128 Meg of memory, and in the past I seem to remember allocation about four times as much swap space as I had physical memory, with better results.
What do you run on this system? Do you run Fedora in GUI mode? Did you read the release notes for memory requirements?
http://fedora.redhat.com/docs/release-notes/
128 MB RAM is very few if running X. Certainly that will cause a lot of swapping with the expected performance impact.
Am I nuts? Does swap space only need to be the size of physical memory? I don't really understand the issues here. Advice?
In past times there was the general "rule" to set swap two times as much as physical memory. Nowadays does not make that much sense any more in general. So if for instance you have 1 GB RAM on a desktop system 512 MB swap should be sufficient. While running a system like Fedora Core 2 in graphical mode with such few RAM like 128 MB you certainly should use more swap than 2x RAM. But as said, swapping will cause the system be dead slow in that case.
-Mike
See the output of "free" to know which way RAM and swap are used currently on your system.
Alexander
Mike:
I would recommend, with 128MB of ram, making your swap at least 256MB. I would more lean towards 512MB if you are running X. Actually, I would highly recommend against running X if you have less than 256MB of ram due to the requirements for X and most X based programs.
James McKenzie
Mike Witt wrote:
My newly installed FC2 systems is running a lot slower than I expected. I chose the "default" partitioning scheme suggested during installation. And fdisk now reports this as:
# fdisk -l
Disk /dev/hda: 41.1 GB, 41174138880 bytes 255 heads, 63 sectors/track, 5005 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 4981 39905460 83 Linux /dev/hda3 4982 5005 192780 82 Linux swap
Isn't that around 188 Meg of swap space? My system has 128 Meg of memory, and in the past I seem to remember allocation about four times as much swap space as I had physical memory, with better results.
Am I nuts? Does swap space only need to be the size of physical memory? I don't really understand the issues here. Advice?
-Mike
On Sun, Oct 31, 2004 at 05:49:45PM -0700, James McKenzie wrote:
I would recommend, with 128MB of ram, making your swap at least 256MB. I would more lean towards 512MB if you are running X. Actually, I would highly recommend against running X if you have less than 256MB of ram due to the requirements for X and most X based programs.
James McKenzie
Mike Witt wrote:
My newly installed FC2 systems is running a lot slower than I expected. I chose the "default" partitioning scheme suggested during installation. And fdisk now reports this as:
Do not be concerned that the default swap partition is small. You can always add swap files at a later date.
It can be important to have a largish swap file simply because kernel bookkeeping can demand that there be resources to satisfy the implicit reservation.
There is a real life analogy worth sharing.
If you are traveling and check into a hotel for a week or a month. The hotel will run your credit card and preapproved not only the room but in many cases they will preapprove enough to cover the mini bar, restaurant and more.
Now you take the same credit card out of the hotel and in a fine restaurant find that you no longer have any credit on the card so you use another card. The day after you check out from the hotel the large preapproval amount is replaced with a smaller amount that reflects the real amount.
In linux I can "malloc()" a large chunk of memory and attempt a fork(); exec() sequence. It is possible that the fork() will fail because there is not enough virtual memory to hold the two copies of the process as specified by fork() semantics. The Mallory() memory may never have been touched, simply reserved. The equivalent is that you are now over drawn at the virtual memory bank and have exceeded your credit line.
None of the above malloc() and fork();exec() sequences needs very much additional physical memory but the system must reserve the additional resources because that is the contract implicit in the system call....
The BSD folks added the vfork() system call to give the system some hint that the full reservation of memory is not needed.
There is a kernel option for lazy kernel memory book keeping. I do not recommend that it be used ....
Go with the defaults and add swap files if needed.
On Sat, Oct 30, 2004 at 08:47:36AM -0700, Mike Witt wrote:
Isn't that around 188 Meg of swap space? My system has 128 Meg of memory, and in the past I seem to remember allocation about four times as much swap space as I had physical memory, with better results. Am I nuts? Does swap space only need to be the size of physical memory? I don't really understand the issues here. Advice?
Well, one of the issues is: if you're using swap _at all_, your system is going to be horribly slow. In my estimation, unbearable for interactive use -- others may have more patience. Swap should be there for emergencies (and perhaps so long-running processess that rarely get used get moved out of the way -- but that's only going to be a few megabytes at most).
On a system with only 128MB of RAM, I'd try to run as lightweight an environment as possible. Ditch GNOME and KDE, to start....
On Mon, Nov 01, 2004 at 09:23:06AM -0500, Matthew Miller wrote:
On Sat, Oct 30, 2004 at 08:47:36AM -0700, Mike Witt wrote:
Isn't that around 188 Meg of swap space? My system has 128 Meg of memory, and in the past I seem to remember allocation about four times as much swap space as I had physical memory, with better results. Am I nuts? Does swap space only need to be the size of physical memory? I don't really understand the issues here. Advice?
Well, one of the issues is: if you're using swap _at all_, your system is going to be horribly slow. In my estimation, unbearable for interactive use -- others may have more patience. Swap should be there for emergencies (and perhaps so long-running processess that rarely get used get moved out of the way -- but that's only going to be a few megabytes at most).
On a system with only 128MB of RAM, I'd try to run as lightweight an environment as possible. Ditch GNOME and KDE, to start....
Now I am on the other side of the argument. It is not necessary to ditch Gnome and KDE for such a system although having only one of them is necessary, But other things might be ditched. Are you going to do development of kernels, or other systems? If not don't install their development rpms. Games in such a system can be dropped. You may not be interested in being a web, name or other kind of server? If not drop that option form the installed list.
Although I have an argument with one of my colleagues about this my experience is that 128MB is enough if you don't install everything, but choose your installation options wisely.