On Wed, Jun 23, 2004 at 02:38:33PM +0200, Erwan Velu wrote: > I've just realised that ganglia is not able to count the number of > processors of a system. > > I've been discussing of that with some other project, it could be good > to count or show the number of virtual processors. > > when ganglia shows 2 processors on a host, is it 2 physical processors > or 1 phys with 1 virtual (ht). > > We can use the physical_id (/proc/cpuinfo) to manage this. I suggest > something like for 1 CPU HT. > > Name Value > cpu_phys_num 1 > cpu_virtual_num 1 > > for 2 CPU non HT. > Name Value > cpu_phys_num 2 > cpu_virtual_num 0 > > For a dual proc HT > Name Value > cpu_phys_num 2 > cpu_virtual_num 2 > > > WDYT about it ?
IMO, this is too simple to be of much use, but I suppose it's not too bad. There isn't any easy way to compute this of some other platforms though. This handles the current case of perfect symetry between processors, but doesn't hand more complex cases where different procs have differnet numbers of virtual CPUs (OK, so you can't do that today, but nothing in the architecture prevents it.) It also becomes a bit odd if you have >2 threads per CPU. The implications of a CPU being virtual are complex and dependent on the implementation. HTT is mostly a minus on the Intel netburst architecture, but is generally considered a plus on the Alphas that implement it. I believe that simple numbers don't really convey the situation. A NUMA topology map would be more useful, but harder to represent. The kernel needs to do that anyway since managing the shared cache is crucial to obtaining any kind of decent performance with HTT. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
pgpA4sSJOoSGw.pgp
Description: PGP signature

