Operating System - Linux
1828528 Members
2482 Online
109979 Solutions
New Discussion

Re: tune memory kernel parameters

 
Hanry Zhou
Super Advisor

tune memory kernel parameters

I've just installed RHL 9 on my 128Mb pc, but it is slower than I expect, ex, takes long if I run a find command.

I find some thread here discussing tune memory parameters, but is not very specific.

On my GRUB settings, what parameters and in what files I need to tune, and how?
please step by step.

Thanks,
none
4 REPLIES 4
Stuart Browne
Honored Contributor

Re: tune memory kernel parameters

If your /proc/meminfo says you've got a MemTotal of 128000 kB +, then there performance degradation is 'cause you're using an old crappy PC with an IDE hard disk.

Unlike a number of other unicies, you can't fork over a fixed amount of resources for things like disk buffers and caching. They are dynamically assigned, depending on system usage, and memory availability.

With only 128Mb RAM, I'm picking you are swapping.

The 'meminfo' information tells you how it is being split up and used for the major subsystems. Using the 'ps' and 'top' commands you can get how much an individual process is using at any given moment. You might want to drop some of the services that you are not going to be using (use the 'chkconfig' and 'service' commands here).

If it's going to be a server machine, immedialy change the default init level to 3 (modify /etc/inittab) to stop X running, and turn off XFS. If you are using it as a desktop machine and like the GUI, expect slowness.

Any way, just some thoughts.
One long-haired git at your service...
Vitaly Karasik_1
Honored Contributor

Re: tune memory kernel parameters

Playing with your harddisk settings (DMA ?) may help - see

"man hdparm "

http://linux.oreillynet.com/pub/a/linux/2000/06/29/hdparm.html - Speeding up Linux Using hdparm



for more.

Regards,
Vitaly
Thomas Bianco
Honored Contributor

Re: tune memory kernel parameters

Short answer: buy more RAM.

You can run a solid system on 128, but you have to be careful.

Kill any running processes:
Top will give you a nice listing of what's running and how much space it's taking up. ? Key gives usage options

Prevent deamons:
I???m not terribly familiar with RH9, but there are always tools to change the start-up params. Look for a services config or deamon config tool.

Xinetd:
This deamon is usually a memory hog for no good reason. Go into /etc/xinet.d and look for any services your using. If nothing matches, use the above services tool to stop running it all together.

Recompile the kernel:
You can usually increase available ram by compiling out options that you don't need. This is fairly advanced, and won't get you a whole lot. I would only do this if you are SURE you KNOW what you need, and you've only got a few Megs being swapped out.

Swap partition:
Using a swap file slows things down, be sure your using a swap partition. Look at /etc/fstab to see what???s here. Also, if you have 2 disks, put swap on a private or less used disk. If you can avoid it, don't put swap on the same disk as root or /user.
this won't get you more available ram, but it will ease swap delays

Hope this gives you some direction.

Good luck.
Ganbaru de.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
Dave Falloon
Trusted Contributor

Re: tune memory kernel parameters

I think Vitaly is correct.

Can you post the output of the following commands ( replace the disk letter with your corresponding disk(s) ):

hdparm /dev/hda

hdparm -t -T /dev/hda

The first command shows all the settings of the hard drive, the seconds shows access speeds. This will help determine if this is a memory problem or a hard disk problem. The reason I think its your HD not your memory is because your example command "running a find" is pretty much hard drive limited. I don't remember ever having it slow down due to memory being used up, but I do recall many times when I had not set any hard drive params and find commands would show maybe ten lines then pause and then spit out another ten lines and the stop, etc, etc ad nauseum.

I hope that helps,

Dave
Clothes make the man, Naked people have little to no effect on society