Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance issues with Linux

Status
Not open for further replies.

hallm

Programmer
Jun 11, 2000
159
US
I recently install Red Hat 7.3 on a PII 400. I was seeing terrible lag on everything I did in the GNOME and KDE GUI's. The apache webserver has a good bit of lag on local requests but it serves text pages ok from the internet. When graphics are involved or when I try to bring up webmin a good bit of delay is produced. When I initially installed the operating system I did so with 32mb of ram, but withing the past week I boosted that to 160mb or ram. I haven't seen any type of performance increase. Is there someing in Linux or apache that has to be changed manually to take advantage of the increased memory.

Is the speed of the computer the issue? Also, our internet connection is DSL, is that enough to host a small website? The page that I'm putting up would just be text and graphics right now.
 
Most of the time these types of problems are associated
with slow IO.
I've had many older desktops (p2-amdk6ii)that would
display this type of behavior.
Using hdparm is the cure man 8 hdparm.

OTOH:
With 32 megs of RAM and KDE/GNOME you should have really
felt a hit so this is normal.
You don't need to run a big desktop environment:
you can use something like blackbox and run
KDE/GNOME apps from this; saves at least a little
memory.
Apache can also be very expensive and more RAM is the cureall for this.

For a busy basic home webserver and frequently used
desktop I would say you need at least 300+ megs of RAM
and well tuned IDE performance.
After tuning your harddrive(s) to your satisfaction
you should place these commands in boot.local so the
changes are activated on startup.
 
I had a problem just like that. It got so bad, one night in a fit of rage, I deleted linux and installed windoze. When I couldn't get any of my kids to switch PC's with me, I calmed down and reinstalled linux. I was thinking I would work out the problem. Lo and behold, after the install, everything worked great. I cheated myself out of a good education by not figuring it out. I had 256 MB of memory but it would still max out the "swap space" on the drive. I think somewhere along the line, the X-server was messed up. I don't think it's gnome or kde because they both do it. You might try reinstalling or refreshing the xserver packages. as for the DSL question. You'll be fine. I run a few websites and a small network on my connection.
 
RA,
That is a sad story..not because of the problem,
which was definitely solvable, but because of the
solution.
With all the tools available to a linux user to
diagnose problems, catch runaway processes, and fix
problems a reinstallation is never the best choice
except in catastrophic situations.

This is a bad habit learned from registry corruption, unfindable windows problems, and assorted windows
blue-screen type shenanigans with no diagnostics
and a handy recovery disk.
As a fix it doesn't belong in the linux forums IMHO.

 
I didn't see much of a performance increase by using hdparm. (I found a tutorial on the internet). Thanks, for the suggestion.

Someone on another forum suggested that I make sure that my swap partition or file was at least twice as big as my physical ram. Like I said before I'm new to Linux, I'm not seeing a swap partition at all. Or maybe I don't know what I'm looking for. How do you create it if it's not there or increase it if needed or is this my problem anyway.
 
If you have not created swap space that is a good
candidate for your slow performance. You need
virtual space(swap) for less important processes and
for slow storage when you run out of RAM.

man 8 mkswap
If you will be using linux frequently get used to using
the man pages. All the information you will need is usually right there.

In your case if you have already created your partition
table and did not create a swap partition then you will
need to create a swap file and create the proper initialization for it either through an rc script or
through your distributions boot management script.
Usually this is handled in a boot script with the command swapon -a ,and entries in /etc/fstab, but YMMV.
 
Normally, Red Hat won't install without a swap partition having been defined. Check /etc/fstab and/or do fdisk -l on the block device for your drive (first IDE drive uses /dev/hda for example. Also fdisk -l without the block device parameter will list all partitions on all block devices on your system). If you have a swap space on a partition you will see it in the output as Linux Swap. You should also note the number of blocks which indicates the partitions size (divide by 1000 to roughly estimate MB). Normally it's best to have the swap space on a defined partition but it is also possible to use a file on any part of the file system. A good place might be the /var directory. Read the man page for mkswap which has instructions on how to do this. Most important in those instructions is the use of the dd command in creating a contiguous file space in your filesystem. e.g. dd if=/dev/zero of=/var/swap/swap01 bs=1024 count=65536 creates a contiguous file (by reading from /dev/zero) of 64MB (block size=1024bytes * count=65536)
 
Reinstalling Linux fixed the problem. This time I just chose the server installation instead of customer. Maybe I did some things during the custom install that messed it up. I'm sure that the problem could have been fixed without reinstalling linux, but I just didn't have any more time to spend diagnosing it and didn't want to put anything else on it, since I might have to reinstall anyway.
 
Oh, I almost forgot. I appreciate all of the helpfull hints and comments.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top