This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: random performance of sem_post function
- From: Carlos O'Donell <carlos at systemhalted dot org>
- To: "Maury, Olivier" <Olivier_Maury at mentor dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Fri, 04 Jan 2013 14:10:38 -0500
- Subject: Re: random performance of sem_post function
- References: <F1072D027E48DD4F93B3FDC2992B49615BD08E79@EU-MBX-04.mgc.mentorg.com>
On 01/04/2013 12:21 PM, Maury, Olivier wrote:
> What is very strange is that this simple sem_post function is not
> tacking the same amount of time in both executables. In one of them
> the order of magnitude of the function call is almost all the time
> about 1e-5s while in the other one it's goes from 1e-5s (very rare)
> to 1e-2s (quite often).
1e-2s is 100Hz, which might be approximately the scheduling frequency
depending on your kernel and target architecture. Modern systems use
1000Hz ticks e.g. 1e-3s.
I suggest using oprofile to determine what the CPUs and threads
are actually doing.
Cheers,
Carlos.