ps is slow compared to other unixes

Gorman, John John.Gorman@pegs.com
Wed, 14 Mar 2001 10:44:31 -0700


One idea might be that Linux has to walk the /proc directory tree
to get the ps data. Most other unixes, even though they may have a 
/proc/pid/data tree usually obtain the ps data from an ioctl()call 
(thus reading the data out of the kernel memory).

There are some areas, this being one, where you can really see that
linux is a patch work of development.

For instance:
* HP/UX uses pstat_*()
* Sun uses ioctl()
* AIX uses getprocs()
* OSF/1 uses ioctl()


John

-----Original Message-----
From: Bill Warner [mailto:wwarner@direct-alliance.com]
Sent: Wednesday, March 14, 2001 9:49 AM
To: PLUG
Subject: ps is slow compared to other unixes


Has anyone else noticed that ps seems to be extreamely slow on high
load servers?

One of our servers that was runing exact same hardware under sco unix
runs ps almost instatly showing all procs on system.

On linux (redhat 6.2) ps is extreamly slow.  To the point where
sometimes
it will take in the area of 1-5 minutes just to get the resaults.  While
the rest
of the server is running at an average slow (because of high loads and
many
users) ps seems to be hundred fold worse.  our hpux, digital unix, and
sco
boxes never had this trouble.  Any idea as to why?


-- 
--
Bill Warner
Direct Alliance Corp.
Unix/Linux Admin.

________________________________________________
See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post
to the list quickly and you use Netscape to write mail.

Plug-discuss mailing list  -  Plug-discuss@lists.PLUG.phoenix.az.us
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss