Click to See Complete Forum and Search --> : Changing Swap space
programmer_83
03-06-2004, 01:44 PM
hello all,
i have intel celeron 466 mhz system with 160 MB RAM. recently, i installed red hat linux 8 on my machine. by mistake, i created the swap partition as only 200 MB. now my machine works damn slow. i just wanted to know, is there any possibility of changing the swap partition manually, without affecting the /root partition.
thanks in advance.
glasdave
03-06-2004, 02:24 PM
Are you sure your even using your swap space? What kind of programs are you running ? I use Mandrake and in the control center, which you need to be root to get to, I can go in and change every thing in the system. Should be something like that in rh.
programmer_83
03-06-2004, 02:37 PM
i dont use any special kind of programs. when i got to the gui of the linux, the system struggles. :(
programmer_83
03-06-2004, 02:50 PM
i dont use any special kind of programs. when i got to the gui of the linux, the system struggles. :(
Use cfdisk to to partition your hd. Then all you need is do mkswap /dev/device to set up the swap.
maccorin
03-06-2004, 03:10 PM
you need to do 'mkswap /dev/hdx' and then change your fstab file. But keep in mind that if your using swap space your **** is going to go slow no matter what, having a larger swap space will not make any difference. If you wanna speed it up, you need to buy some more ram so that your not using swap at all. Sucks to spend the money I know :(
EnigmaOne
03-06-2004, 03:53 PM
gtop or ktop will tell you what your swap utilization is but, anytime you start swapping to a major degree, you slow down markedly; so I'm going to guess that you're swapping with full memory utilization.
Adding memory will certainly improve things. From the sound of it, the motherboard probably tops-out at 256MB.
If you can go with more memory, by all-means do it.
The Celeron-class machines are a bit on the slow-side, so don't expect miracles.
I have an old HP 533MHz Celeron, 256MB system as a secondary file/print server; which handles those functions quite well. It falls-flat when you load-up the GUI (KDE or GNOME) though, leaving you waiting a bit on response times. Since it's a print server, the GUI is rarely used anyway.
You can optimize the machine a bit though:
~If the motherboard will let you install a Pentium uP (not likely, but I've seen a few that will allow it) do it. (I won't tell you to OC the machine, but you'll know if it's even possible and if you can get away with it on your hardware or not.)
~Stuff it with the maximum amount of physical memory, at the fastest rated access speed, as the motherboard will allow.
~Use hard drives matched to the IDE channel speed and, if appropriate for your chipset, enable DMA access.
~Optimize the motherboard BIOS settings for speed. Also check for BIOS upgrades that may apply to your situation.
~Use an AGP graphics card (32MB to 128MB graphics memory), as opposed to a PCI graphics card, if you have the AGP slot. Match the AGP card to slot speed ratings and enable higher AGP transfer rates in the BIOS settings.
~Place the swap partition (mem_size*2) on a physically different hard drive, on the secondary IDE channel. Use the rest of the room on that drive for secondary file storage.
~Make sure the CD-ROM drive is on the secondary IDE channel as the secondary device, for the time being.
~Do a custom install of RH9 (my impression is that it's a bit faster than RH8), skipping all the services that you don't need. Keep it light.
~When you're done, remove the CD-ROM drive from the machine and use the network for the kind of file access that you would have used the CD-ROM drive for; or shift the CD-ROM drive to a tertiary IDE controller card (Promise, etc.).
~Re-compile the kernel, removing all unnecessaries.
~Use a lighter-weight GUI (FluxBox and BlackBox are frequent recommendations) of your choice.
~Shutdown and disable all further unneeded services.
The specifics of your hardware are going to dictate how much of the above you can do, and how far you can push any specific item.