LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux can't handle the pressure (https://www.linuxquestions.org/questions/linux-general-1/linux-cant-handle-the-pressure-11916/)

linus 01-16-2002 01:18 PM

Linux can't handle the pressure
 
Well actually I am sure that it can if it is tweaked just right.

Situation:
Small network (14 computers) . All win 98 except the Linux (Redhat 7.2) box being used as a file server. Linux server is AMD k6-2 500 w/128 mb ram and a 7200 rpm 20 gb hard disk.

With 1 or 2 win 98 boxes connected to the Linux file server all is okay. When the other boxes are connected to the network the linux box slows to a crawl. The mouse barely moves and accessing the files on the linux box is very, very, very slow. Almost no response.

When I replaced the Linux box with the Win NT box that I was hoping to replace, all was sweet and quick again.

We would REALLY like to use Linux. Any ideas?

I really appreciate the great info that I have received from LinuxQuestions users re Linux!

rshaw 01-16-2002 01:35 PM

if the xserver is running on the linux box, turn it off. then add a lot more ram to try to compensate for the slow processor.

AMDPwred 01-16-2002 02:06 PM

Yeah, 128MB isn't enough for a server like that. I would imagine you would want around 512MB for 14 users at once.

trickykid 01-16-2002 02:52 PM

also, what all do you have running at the same given time on the linux box.. i am sure there are some processes running that really don't need to be.. have you tried eliminating some of the processes that have no business running ?? if applicable that is..

bankrupt 01-16-2002 03:25 PM

No offence to the last response, but I doubt that the problem is the memory. At home I run a Intel 133Mhz 64mb RAM linux box and it is as fast as my 550Mhz win2000 in most cases. I run xserver by the way.

Is this linux box replacing the NT box as a file server or is it just a client? If so is it running Samba, NFS...? Are there any other pcs on the wire? (Win ME, 95)

Have you looked at all the services running and made sure that you need them all?

Chris

linus 01-16-2002 03:34 PM

We do have xwindows loaded so we will certainly add more memory.

The system monitor right now shows memory usage at 50% with 6 computers on the network but no one accessing the files on the Linux server.

Nautilus seems to take the lions share of memory at 59520k. smbd is next at 10732k.

Memory and cpu were both at the high end on the system monitor graphs when we had the 14 computers hooked up with the win 98 boxes accessing files on the Linux box. We started the system monitor only after the bog down.

The winnt box that sails through the tasks is similarly equipped. Pentium II 450, 128 mb ram vs k6-2 500, 128 mb ram on the Linux box.

No wins or dns or dhcp running on the Linux box. There are other processes running. Most of them look like they are needed but honestly I am not sure if there are processes I could kill.

rshaw 01-16-2002 03:52 PM

Quote:

Originally posted by bankrupt
No offence to the last response, but I doubt that the problem is the memory. At home I run a Intel 133Mhz 64mb RAM linux box and it is as fast as my 550Mhz win2000 in most cases. I run xserver by the way.

comparing apples to oranges. there's a huge ram requirement difference between a one user home machine and a 14 user server.

BrianG 01-16-2002 04:10 PM

try getting out of X, then connecting all boxes and see how sluggish it gets (not in X).

bankrupt 01-17-2002 01:04 PM

Quote:

Originally posted by rshaw


comparing apples to oranges. there's a huge ram requirement difference between a one user home machine and a 14 user server.


I run 6 other PC's on my home network(Linux and windows 98/w2k's) that all connect to my Samba Server. I have never seen as much as a hiccup in over a year.

rshaw 01-17-2002 01:19 PM

do you have 6 other users all making demands on the linux box at roughly the same time?

taz.devil 01-17-2002 02:25 PM

There are alot more things to depend on in a network situation. Aside from the server probably needing some more RAM, how good is the hub? Are you using a hub, if not are you on a coax setup(slow)? Perhaps look into the clients and thier capabilities as well. A network isn't just the server, it's everything and you can't just pass judgment on the server only, even if the NT one serves better. NT was designed to be an efficient server right off. Linux has to be setup properly AND efficiently. If you want a dedicated file server, that's all you need to have running, nothing more, nothing less. As suggested, get rid of the memory hungry processes and keep it to just what you are using it for. This is why I love Netware.

bankrupt 01-18-2002 02:44 PM

Quote:

Originally posted by rshaw
do you have 6 other users all making demands on the linux box at roughly the same time?


:D You got me. But I will try it tonight!

rshaw 01-18-2002 03:24 PM

i'm not trying to get you, and as other users have mentioned, there are other things that could be at fault. ram is a good place to start troubleshooting.
.

linus 01-18-2002 07:37 PM

I realize that there may be other factors re the performance. The network infrastructure tested fine.

I now have the Linux box connected to just 6 windows boxes and I have added an additional 192 mb ram for a total of 320 mb ram.

For the past 2 days I have been putting the linux box through the paces. I started the Linux box in just command mode and started samba. I then set the windows computers to constantly ping the linux computer constantly (ping <server> -t) for an hour or so. Then I try to do things like copy files during the process.

The cpu doesn't max out but even with the extra ram the memory does max out. Even after the windows computers have been shut down for several hours the Linux box doesn't recover memory.

Perhaps one of the dimms is a bit flaky. I will try to get some more and rerun the test.

Do some linux distros handle memory better than others?

DavidPhillips 01-18-2002 08:54 PM

Are you sure the memory is not just cached?

Redhat caches more memory than it is actually using, also it may buffer an almost equal amount so it will show around three times the memory it is actually using.

how much swap space do you have?
RedHat 7.2 uses double the amount of swap as it has memory. This is normally not required because many people do not use all of their memory, if you are actually using most of the available physical memory then you will need a swap partition that is double the ram for the caching and buffering to work


right now my laptop is showing 27% used + shared, 29% buffered, and 37% cached.

so it is showing very little free, but it is actually not being used by anything.


If it seems that you may be experiencing slow harddrive access

check it with hdparm -Tt /dev/hda

speck 01-18-2002 10:14 PM

It's probably not a good idea to run Gnome and Nautilus on a server (especially with a slower CPU). You should download and install a lighter window manager (IceWM or Blackbox are good choices) because Gnome and Nautilus are notorious for being slow on mid-low end machines.

Linux will grab all available memory and store it in cache and buffers, so that's normal. Run "free -m" command and look only at the " -/+ buffers/cache:" line. The amount under the "used" header is really the amount of memory being used.

Run "service --status-all" as root to see all the system services and their status (running/stopped). You can also type "setup" and look at the system services via a curses based menu. In "setup", you can move the cursor to a service and hit the "F1" key to see a description of the service. You should stop ("service servicename stop") any services that are not necessary.

Speck

linus 01-18-2002 10:20 PM

I checked the hard drive with hdparm right after the first bog down and though I don't recall the exact mb per second throughput I do remember that it was quite good.

One reason that I do not think the memory is just cached is because if I am in KDE or Gnome after a memory max out the mouse gets very jerky, the system responds very sluggishly and the screen saver starts looking .... well strange. The system monitor shows <4000kb free.

I have been testing the system without startx and then starting kde or gnome to check the system monitor.

Is there a way to do that (monitor the system) in text mode?

Thanks all for the comments and insight. I will try to look at the swap partition when I return to work.

speck 01-19-2002 12:36 AM

For console monitoring tools, there are top (process, cpu usage, memory), uptime (system load average), free (memory), sysstat (sar and iostat programs - usually run via cron), iptraf (very good network monitor). The sysstat and iptraf programs will probably not be on your system (you can get them from freshmeat.net).

While you are at the console, run "free" and post the entire " -/+ buffers/cache:" line to this forum. This will help narrow down the problem.

Once again, Gnome and KDE are very resource intensive and probably shouldn't be used on a server. If you need a window manager, take a look at some of the smaller (memory and cpu usage) ones.


Speck

linus 01-23-2002 10:54 AM

Back at work and checking the penguin...

I just started the linux box.

Currently my -/+ buffers/cache line reads:
used 22 free 258
For the "mem" line:
Total 281 used 41 free 239 shared 0 buffers 5 cached 13
from the swap line:
total 250 used 0 free 250

I have just started a constant ping from 5 other computers and will let that run for awhile. I may also copy a large file over the network.

I will report the free -m stats after that.

I am also installing the redhat 7.2 on another box w/ a pentium processor to compare systems.

linus 01-23-2002 01:47 PM

After a constant pinging the memory stats using free -m stayed the same.

However, after copying a 200 mb file from the linux box and then back to the linux box free -m showed:

Mem
total 281 used 278 free 2 shared 0 buffers 5 cached 242

-/+ buffers/cache
used 29 free 251

swap
total 250 used 0 free 250

DavidPhillips 01-23-2002 10:29 PM

is it still slowing down

Jester888 01-23-2002 11:30 PM

Harddrive?
 
Is the hard drive IDE? or SCSI? if IDE is it running on ATA33/66/100? Is it the only device on the cable? if CD-rom is there, is it being accessed? if SCSI - SCSI2, U, UW. U2 SCSI3? when booting, what does the SCSI adapter report as the device speed?

SlCKB0Y 01-24-2002 04:38 AM

Ummm..i only read halfway down the first page so forgive me if this has been pointed out later on.

We have people talking about cpu's, ram etc. WHAT ARE YOU TALKING about. do you know what you are talking about?

Why has no one asked this person the network speed yet? is it 10/100/1000 mbit?

if its the first one then you definately need to sort that out. if it is mixed, then this will prob cause speed issues as well.

mato30 01-24-2002 05:47 AM

I donīt think the problem is in the speed of the CPU or amout of RAM.

I have been running RH as a file server and web server on our network for more than 2 years. It's been ruuning without any problems and it's faster than NT server I used berfore.

Here is setup:

12 workstations WIN95/98

Server:
PentiumPRO 200MHz
128MB RAM
20GB SCSI HDD
The Xserver is running all the time and apache server is getting under greater presure as we port part of our clinet win applications to PHP/Postgres applications.

I would recommend to rewiew your cmb.conf file.

linus 01-24-2002 09:34 AM

Thanks again for all of the input.

The system still bogs down. It is on a 10 mb network but again...the winnt box flies through the processes.

I have checked the hard drive and get very good throughput. It is ATA-100 7200 rpm IDE.

I will take a look at the cmb.conf file but really wouldn't know what to look for.

mato30 01-24-2002 11:13 AM

a mistake
 
Quote:

Originally posted by linus
Thanks again for all of the input.

The system still bogs down. It is on a 10 mb network but again...the winnt box flies through the processes.

I have checked the hard drive and get very good throughput. It is ATA-100 7200 rpm IDE.

I will take a look at the cmb.conf file but really wouldn't know what to look for.

I misspelled cmb.conf. It should be smb.conf

mato30 01-24-2002 11:28 AM

sample global settings
 
Quote:

Originally posted by linus
Thanks again for all of the input.

The system still bogs down. It is on a 10 mb network but again...the winnt box flies through the processes.

I have checked the hard drive and get very good throughput. It is ATA-100 7200 rpm IDE.

I will take a look at the cmb.conf file but really wouldn't know what to look for.

Here is my setup (it may be helpful). It's not perfect, but works with no problem.

;*******************section global*****************
[global]
dos filetime resolution = yes
fake directory create times = yes
delete readonly = yes
blocking locks = yes
oplocks = yes
locking = yes
share modes = yes
ole locking compatibility = yes
netbios name = server
character set = ISO8859-2
client code page = 852
workgroup = workgroup
server string = Linux
printcap name = /etc/printcap
load printers = yes
log file = /var/log/samba/log.%m
max log size = 50
security = SHARE
log level = 1
read raw = yes
write raw = yes
max xmit = 65535
getwd cache = yes
lpq cache time = 30
socket options = TCP_NODELAY IPTOS_LOWDELAY
dns proxy = no
encrypt passwords = yes
password level = 0
preferred master = no
os level = 0
null passwords = yes
dead time = 0
debug level = 0
strict locking = False
strict sync = False
sync always = False
domain master = no
;

DavidPhillips 01-24-2002 09:25 PM

I had a server on a network with 25 or so users, some on 10MB hubs and some on 100MB hubs. While this may effect the speed at which the data moves through the network, it was still very much usable.

I would expect it to do better with the 10 MB hub because it puts less demand on the server.

There are a couple of other things that come to mind on a LAN...

All systems should have the same mtu.

the socket options in the smb.conf file

linus 01-25-2002 08:21 AM

Hmmm.... I hadn't thought about the socket options.

Right now we have the socket options set at:

TCP_NODELAY S0_RCVBUF=8192 S0_SNDBUF=8192

Is there a problem with this or is there an option that would maximize the socket options?

DavidPhillips 01-25-2002 10:04 PM

you need to test it without the setting to see what it will be like.

you could try


socket options = IPTOS_LOWDELAY TCP_NODELAY

or maybe IPTOS_THROUGHPUT

you will have to experiment


check out ...

man setsockopt

joeprogrammer 07-12-2002 01:08 PM

If you have another PC laying around, configure it with just the services needed. If the problem goes away, then you know it's something in the current box. Otherwise, look for I/O problems like hard drive or controller. Wild speculation - It could even be a BIOS or other motherboard problem. Try loading Linux on the NT box and see if it cruises as well as NT did. Or - load NT on the slow Linux box and see what you get!

bdp 07-12-2002 03:11 PM

if you continue to use x, unclicking 'use nautilus to draw desktop' in the window options of nautilus might recover another ~50MB RAM.

shoot2kill 07-12-2002 03:26 PM

If you continue to read the thread properly, it was due some months ago.

coldascold 04-19-2003 06:01 PM

You have a full on mulit-threading problem.
I had the same Problem on a Busy LAN with an AMD 1200mhz , 720 SDRAM,IDE disk machine.

Ya I am talking a Busy LAN that uses its Server,for all purposes.
The poor thing would barly do anything in a Graphical sense or multiple disk transfers .Same happened to Win 2000 in the same position, Browsers were very slow to open on the server although you should never use a server for this purpose.

Upon getting a cheap NetServer 133mhz with 64 RAM and 10,000 RPM SCSI disks the Problem went away totally although the machine was never able to run X windows So could not be tested to the full extent,however multiple transfers from the disks were improved 100% in speed and the rest.

You need a Server Mr. Linus

Whitehat 04-19-2003 09:00 PM

Yo,

I am not trying to be mean at all......but....

I see absolutely NO reason to use a window manager with a linux server. I would have that box loaded minimally with like RH 7.3 with command line only. Like 700 MB's loaded. Or Slackware with a minimal load too.

You can do everything with command line ;)

For what you are doing you should be able to get away with a PIII500, 512MB RAM, and just command line. Heck 256MB would probably be just fine.

WM's hog memory and so do nice pretty fancy GUI apps...

Peace out...

Mork 04-20-2003 03:05 AM

Have you checked if DMA is activated. In some distros it defaults to off. I run a box for a while without having it activated and got all sorts of freeze-ups while moving lots of files (on a Pentium IV 2,4 GHz).

Use hdparm to check if its enabled and toggle it on and off. I don't have the exact command since I'm sitting at a windows box at the moment, man hdparm should give you the answer.

plisken 04-20-2003 04:57 AM

Similar situation
 
I have been running a RH7 server, providing FTP, http and also file serving to at most two other machines(Win*).

This machine sis equiped as follows:

AMD Athlon 800MHz, 1Gb, 60Gb HD, AGP graphics(nothing special), no sound.

I have always found it to struggle when transferring files, especially once the size of the files/folders go over 50Mb. During transfers like this the mouse etc on the Linux box is VERY unresponsive. Obviously running without X would improve this.

But when I use my NT box in place of the Linux box, NT specifications as ffollows:

AMD K6III 450MHz, 128Mb, 120Gb HD, AGP graphics(nothing special), no sound.

There is no such problems, I can transfer files to and from the NT box to my two other Windows machines, also surf the net from the NT box at the same time.

I alwasy put this down to samba, but recently I have experimented with other applications on the RH7 Linux box and found them to be much slower than that of comparable applications when run on a Windows machine.

In answer to the initial post, I don't think increasing the power and specifications of the Linux box so that it performs comparably to that of a Win NT box is the answer. This is one area, that I have felt let down by Linux, it seems to require greater specifications to match a Win NT box in performance.

DavidPhillips 04-20-2003 11:29 AM

I would imagine you are running a linux system built for a 386 machine on your computer.

Linux is distributed by the larger distros with the aboility to run on older machines. If you want performance you will need to do some code building.

taarnak 04-20-2003 12:19 PM

I noticed that earlier you posted some slowdown that was affected by file transfers through Samba, have you tried to do file transfers through FTP or RCP so you can bypass Samba and see if the issue is the OS or Samba?
If you don't have the FTP or Telnet server installed, download Putty for your Windows machines which will allow you to use SSH and keep your Linux box secure from plain text passwords.

On a side note, you would never get this kind of helpfull information regarding any other OS out there in one forum as you do here.
I have had countless problems solved just from reading through the posts written by some of the Linux veterans here and many helpfull tips that I have implemented to make life easier.
Thanks for sharing your knowledge.

nyfaisal 04-20-2003 08:41 PM

Okay. RAM, network speed shouldnt matter. If it runs fast with NT 4, it should NOT run so slow with linux. Linux now has a good network hardware support similar to NT4 at least, so I wouldn't think its the hub/ ethernet card. Try taking the hdd out of pii 450, and put in amd k6 500, and see if you have similar performance as the pii. Amd K6 is a very slow processor, even slower than celeron 400, and meant for low-end use. PII , on the other hand was standard pentium upgrade for workstations and desktops. So, I'd guess your computer is just slow. I had a k6 450, and RH 7.3 used to run slower than my Pentium 166 box on that. <p>I agree with speck, to optimize the settings, you shouldn't run kde or gnome, get some slick window managers if you need gui- probably reinstall Linux as a file server [take out multimedia, python, bla bla appz]. You can always add 'em later if you need them. Remember, NT 4 doesn't come with a lot of appz other than Notepad wordpad and IE. But probably your linux install had a lot of other appz and daemon running at startup. Try re-installing with minimum appz that you'll need.

nyfaisal 04-20-2003 08:47 PM

Try updating samba to the latest version. Anyone knows about any other samba-like server?

Whitehat 04-20-2003 10:41 PM

Hmm...

I hate to say this but....

Windows 2000 server and even NT4 Server, is a dang good server OS. If the box is not used to surf the web, and it is behind a firewall and it NOT accessable to the outside world....you have no worries.

If you have such good luck with Windows, why move away from it?

I just tried to do that and was not very successful. I have come to the conclusion that when I have a specific use for linux and linux fits that use well, I will switch (or at least use it for that specific use).

Until then, I'll use WinXP on the desktop. It's just dang fast, it don't crash, it runs my games, shares files, and more.

I learned not to be so "gung-ho" about leaving windows behind, as it has it's place just like Linux does.

I personally know that at my workplace we have file servers that are Pentium Pro 200MHz boxes running Windows NT Server 4.0. Those boxes have 300+ people accessing them at most times. Considering we have about 2800 employees. They work just fine. Would those boxes run Redhat Linux 8 or 9 in command line mode? Sure, and they'd run fine. Would they run the GUI? Sure, and they'd run it like crap.

People need to not discount the value and goodness of Windows. They didn't get where they are today by sucking all the time....just some of the time :D

Later...

Franklin 04-20-2003 11:16 PM

I'm no netwoking expert but I read this thread because I'm going to be trying the same thing in my office in the near future.

The whole mouse sluggish comment reminds me of how my machine runs when a process is out of control and my CPU usage is stuck at 97.2%

Have you checked the CPU usage when the server bogs down and run top to see if there is a process thats out of control and is it the same thing every time?

DavidPhillips 04-20-2003 11:54 PM

A server for that many is not supposed to even have a mouse. It probably should not even have a monitor and keyboard, except for installation and problems.

A server should never be used as a desktop machine. I think that if you have only one machine it should not be a server. If you have more than one then one of them can be a server.

There is no need for a window manager on a server, but if you must install X on it then twm or wmaker is a good choice. The server should always be booted into runlevel 3.

Linux will make a great secure server. You just can't expect it to be a desktop machine at the same time. It's just not supposed to be used that way. And Windows 2000 server should not be used that way either.

tangle 04-24-2003 08:08 PM

Linus, what is the setup of the NT server that you want to replace? You mentioned that the Linux box has one 20 gig IDE hard drive. That is probually the cause of your problem. You have the OS and the user request for file hitting that single hard drive all at once. Since you have 14 users accessing that server, a single hard drive is not an ideal setup. I think that if you would add a (let say) 4 gb hard drive for the OS and put the data that you want to share on the 20 gig hard drive you would see better preformance. 14 users is not a lot, but if they all request data at the same time it would bag down the server.
Also I have noticed that distro's like Red Hat and Mandrake run a little on the resource demanding side. I changed one of my servers over to Slackware and it runs a lot faster. If you wanted to get rid of the GUI and still have an easy way to configure you server try Webmin. It lets you use a web browser on another machine to configure it. I like it. Also go to http://www.valkyrie.net/~tangle/comp.../smb_conf.htm. I have my smb.conf file posted and a little how-to. It might help.

DavidPhillips 04-24-2003 08:25 PM

One thing I noticed is that on at least some cards using a frame buffer at boot drastically slows performance. It can make it impossible to play games like tuxracer and watch dvd movies. It must also have some affect on the window manager itself, although it's not as noticable as playing a movie or a game is.

mhearn 04-25-2003 04:07 AM

50% cpu usage while doing nothing? That's not right.

Check what is using all that cpu power using "top". I suspect a process is spinning.

mcleodnine 04-25-2003 04:56 AM

Tangle is pretty much bang-on; one drive is pretty lame for any server. You should be using more drives (and no master/slave combinations) and try to separate the load across the different physical devices. There's a good HowTo over at tldp.org which I beleive is called the MultiDisk howto which goes into some detail about how to setup your mount schema for the best possible performance.

And definately give something like slackware a try or at least disable services you aren't using. No sense in running a full-blown apache/mysql/ldap server if all you want to do is run SMB services.


All times are GMT -5. The time now is 04:17 AM.