From: Jacques Gelinas (jack_at_solucorp.qc.ca)
Date: Thu 20 Jun 2002 - 05:44:02 BST
On Tue, 18 Jun 2002 21:16:12 -0500, John Lyons wrote
>
> I'm not sure about the underlying code for the vdu script as I'm not a
> programmer but from my experience I'm running 7 virtual servers each at
> about 500mb of unified disk space and about 100 ununified.
>
> running vdu /vservers/* seems to produce the correct results but it takes 20
> to 30 seconds per vs to perform the calculation and the server load rises to
> 2.00 or 3.00 for 5 to 10 mins.
vdu is a single process. It scans directories and count size. It ignores
files with more than one link (assumes they are unified). vdu is
not a script.
vdu is not capable to raising the load to 2 or 3. Since it is a single process
it can only raise it to 1. Now, vdu is scanning directories and directories, so
access the disk somewhat. Here, doing a vdu on 5 vservers based on
a rh7.2 full install of the first CD, takes 45 seconds (varies a lot from run
to run) on a idle notebook.
Something else is battling propably to access the hard drive on your server
> Is there anything in the source code for the script that's causing the high
> loads?
No.
Try to run
du /vservers/* >/dev/null
to see if you are getting the same result. Here du is faster than vdu. I don't know
why yet.
---------------------------------------------------------
Jacques Gelinas <jack_at_solucorp.qc.ca>
vserver: run general purpose virtual servers on one box, full speed!
http://www.solucorp.qc.ca/miscprj/s_context.hc