Hi everyone,
This problem rang a bell in my mind (back from 1999).
If you are using an SMP system, are the cpu *identical*? I mean, are they
the same make -exactly- (model, clock -and- stepping).
The very same kind of issue happened to me in 1999 when I used a quad-cpu
PPro system as my desktop machine. Because not all these Pentium-Pro
200Mhz were made with the same steppings (I had three SL22Z cpus and one
SL048 cpu), the clock would jump back and forth randomly, causing the PS2
mouse to have occasionnal hicups..
I used the attached C program to display the time deltas (You might want
to run it on your SMP system).
When I got the last non-SL22Z replaced, the time-jump behaviour went
away... I'd check your /proc/cpuinfo for processor differences.. Xig was
very helpful at the time to investiguate the problem but I don't have the
source to their 'timetest' binary (a libc5 binary, I think) to send you..
If your cpus are identical, then I don't know.. :(
I hope this helps,
Vincent
On Mon, 10 Aug 2009, Vu Pham wrote:
On 08/10/2009 01:26 AM, Zavodsky, Daniel (GE Money) wrote:
Hello,
It is probably because you have an SMP system and in the first
two cases the load got spread across two (or more) CPUs. tar -czf = tar
+ gzip so it is possible. You can try running something more
CPU-intensive like building a kernel with make -j2 and see that there
will be an even bigger difference between total and user+system. That is
because total time is just the time elapsed when you look at the clock
but user and kernel time means the sum of time on all CPUs on which the
command has been running.
Regards,
Daniel
Thanks, Daniel. I think you are right. When I turn off all the CPUs but one,
the result shows either 0 or positive numbers ( Sometimes there are negative
numbers like -1.38778e-16 but they are just really 0 )
Then I turn on some CPUs and the results show immediately -0.01, -0.07 ...
Thanks,
Vu
#include <stdio.h>
#include <sys/types.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
inline long
timeval_diff( const struct timeval *a, const struct timeval *b )
{
if (a->tv_sec < b->tv_sec ||
(a->tv_sec == b->tv_sec && a->tv_usec < b->tv_usec))
return -((b->tv_sec - a->tv_sec) * 1000000 +
(b->tv_usec-a->tv_usec));
else
return (a->tv_sec - b->tv_sec) * 1000000 + (a->tv_usec -
b->tv_usec);
}
int
main( int argc, char **argv )
{
struct timeval now;
struct timeval then;
unsigned long n_fwd = 0;
long max_fwd = 0;
unsigned long n_back = 0;
long max_back = 0;
time_t last_log = time( 0 );
gettimeofday( &then, 0 );
for ( ; ; ) {
long delta;
gettimeofday( &now, 0 );
delta = timeval_diff( &now, &then );
if (delta >= 0)
++n_fwd;
else
++n_back;
if (delta > max_fwd)
max_fwd = delta;
else
if (delta < max_back)
max_back = delta;
if (now.tv_sec >= last_log + 1) {
printf( "%.19s FWD:%6ld/%6ld:BACK (%4ldus > delta >
%4ldus)\n",
ctime( &now.tv_sec ),
n_fwd, n_back, max_back, max_fwd );
n_fwd = n_back = 0;
max_fwd = max_back = 0;
last_log = now.tv_sec;
}
then = now;
}
return 0;
}
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list