Hi, On Wed, Jun 15, 2011 at 2:55 PM, Dan Nelson <dnel...@allantgroup.com> wrote: > In the last episode (Jun 15), Yuri said: >> When I test performance of the code, I always observe dependency of CPU >> user time on the presence of other CPU intense processes. Same CPU-only >> deterministic process that on the quiet machine completes in 220 user >> seconds in the presence of, for example, kde rebuild would complete in >> 261, 266 or even 379 user seconds. I am talking about times shown by >> time(1), not actual an execution time. It's the same time as getrusage(2) >> returns in ru_utime field. >> >> Why time that process takes in user seconds depends on what other >> processes are running? >> >> FreeBSD-8.2 STABLE on i7 CPU @ 9200 @ 2.67GHz. > > Some possible factors: > > o Intel Turbo Boost, which raises the clock rate of a single core if the > other cores are idle. A single process on an idle system will run faster. > > o i7 chips have a shared L3 cache across all cores, so a single process on > an idle system will tend to have more of its data in cache compared to a > system with multiple processes, so it spends less time waiting for slower > physical memory lookups. > > o Process accounting isn't exact. I may be wrong, but I don't think > timestamps are taken every time a syscall is invoked and returns. Some > time marked as "user" may actually be "system" time, in which case you may > be seeing the effect of contention in the kernel as more processes are > run.
I would add hyper-threading to the list. Once you don't have enough real cores available to do the job, things do tend to slow down, unless your process is heavily i/o bound. The time process spends on a hyper-thread when it's not active still counts towards total time consumed by the process. --Artem > > You may be able to disable Turbo Boot in your BIOS, which you can use to > determine how much of the single-process speedup is due to that. > > Unrelated but still interesting note on your particular CPU: > http://www.passmark.com/forum/showthread.php?t=2256 > > -- > Dan Nelson > dnel...@allantgroup.com > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org" > _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"