From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: f5392,18e710ffed534d20,start X-Google-Attributes: gidf5392,public X-Google-Thread: fc89c,18e710ffed534d20,start X-Google-Attributes: gidfc89c,public X-Google-Thread: fca1b,18e710ffed534d20,start X-Google-Attributes: gidfca1b,public X-Google-Thread: 110f2c,18e710ffed534d20,start X-Google-Attributes: gid110f2c,public X-Google-Thread: 11035d,18e710ffed534d20,start X-Google-Attributes: gid11035d,public X-Google-Thread: f8302,18e710ffed534d20,start X-Google-Attributes: gidf8302,public X-Google-Thread: fa664,18e710ffed534d20,start X-Google-Attributes: gidfa664,public X-Google-Thread: fee84,18e710ffed534d20,start X-Google-Attributes: gidfee84,public From: viro@weyl.math.psu.edu (Alexander Viro) Subject: Re: Unix Performances Date: 1999/12/06 Message-ID: <82g7kn$c3@weyl.math.psu.edu>#1/1 X-Deja-AN: 557221900 Distribution: inet References: <823m4c$3af$1@jaydee.iway.fr> Organization: -ENOENT Newsgroups: fr.comp.os.unix,comp.unix.programmer,comp.unix.sco.programmer,comp.unix.solaris,comp.os.qnx,comp.os.linux.development.system,comp.unix.osf.osf1,fr.comp.os.linux.debats In article <823m4c$3af$1@jaydee.iway.fr>, Ga�l Trinquart wrote: >I have ported a large piece of C code to various Unix flavors and I'm now >trying to get a comparative benchmark. > >To achieve this, I use the times() system call to obtain the CPU taken by >the application. times() returns both the kernel clock ticks consumed in >system mode(SYS) and in user mode(USR). The figures below represents the >percentage of CPU taken by the system mode [ ie: SYS / (SYS+USR) ]. The >advantage of this measurement is that it is processor-independent and >frequency-independent. ... and disadvantage being that various Unices have different methods of billing the time spent. E.g. QNX is a microkernel and has filesystem outside of the kernel proper. IOW, 'system' here may include way less work than on any other system. Other variations include a lot of interesting stuff, e.g. billing the waiting for I/O to idle task. Another point: swapping time may be included or not - depends on the kernel. And if it is - well, there you go. It depends on the amount of core available, relative speed of disk, etc. >QNX 4.24 (i86) = 2% >SunOS 5.6 (sparc) = 6.8% >OSF1 2.0 (alpha) = 12.0% >Linux 2.2.5 (i86) = 28.3% >SCO5 3.2 (i86) = 39.9% > >What can cause such differences ? >Does it simply mean that system calls are best implemented on QNX ? Not. Most likely it means that time spent in filesystem code was accounted as user time (might be even user time of another process). -- "You're one of those condescending Unix computer users!" "Here's a nickel, kid. Get yourself a better computer" - Dilbert.