This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: random performance of sem_post function


On Friday 04 January 2013 14:10:38 Carlos O'Donell wrote:
> 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.

also make sure your kernel has NO_HZ and HIGH_RES_TIMERS enabled
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]