[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] libevent 2.1.8 stable, delay in timer expiry.



Hi,
    Recently we upgraded to libevent 2.1.8-stable version, Previously we were using libevent 2.0.22.  We have a 1millisecond timer expiry event which is added to the event loop via evtimer_add() function.  Our Target supports High resolution timer(running linux OS), so in 2.0.22 this 1millisec timer expiry was happening properly.

 After our upstep to 2.1.8-stable version, the timer expiry is always happen after ~10millisec instead of 1 millisec. Even i tried changing the 1millisec timer to 4 or 5millisec, but expiry happen always after ~10millisec.  I added a time stamp inside the 1millisec expiry event callback and attached the output taken in 2.0.22 as well as in 2.1.8
Please find below the sample taken for 1 second period.
Some changes in function event_add_nolock_() through which this event_add() was done, but not sure if something was broken there.

Any patches related to this , please let me know.

Thank you,
Ravi

Timestamp output inside 1millisec expiry event callback(in libevent 2.1.8)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curTime.s= 91 nanoSec = 291946120
curTime.s= 91 nanoSec = 300174100 
curTime.s= 91 nanoSec = 310433820 
curTime.s= 91 nanoSec = 320771380   
curTime.s= 91 nanoSec = 331495340  
curTime.s= 91 nanoSec = 341155500   
curTime.s= 91 nanoSec = 350347880
curTime.s= 91 nanoSec = 360548820
curTime.s= 91 nanoSec = 370515980
curTime.s= 91 nanoSec = 380214960
curTime.s= 91 nanoSec = 390411420
curTime.s= 91 nanoSec = 400647280
curTime.s= 91 nanoSec = 411095860
curTime.s= 91 nanoSec = 420297780
curTime.s= 91 nanoSec = 430489360
curTime.s= 91 nanoSec = 440872460
curTime.s= 91 nanoSec = 450089980
curTime.s= 91 nanoSec = 460287080
curTime.s= 91 nanoSec = 470282320
curTime.s= 91 nanoSec = 480594280
curTime.s= 91 nanoSec = 490721080
curTime.s= 91 nanoSec = 501707460
curTime.s= 91 nanoSec = 510924240
curTime.s= 91 nanoSec = 520135820
curTime.s= 91 nanoSec = 530174060
curTime.s= 91 nanoSec = 541357920
curTime.s= 91 nanoSec = 550631740
curTime.s= 91 nanoSec = 560832100
curTime.s= 91 nanoSec = 570328020
curTime.s= 91 nanoSec = 580728600
curTime.s= 91 nanoSec = 590372100
curTime.s= 91 nanoSec = 600575200
curTime.s= 91 nanoSec = 610530960
curTime.s= 91 nanoSec = 620735320
curTime.s= 91 nanoSec = 631860380
curTime.s= 91 nanoSec = 640098480
curTime.s= 91 nanoSec = 650301780
curTime.s= 91 nanoSec = 660511100
curTime.s= 91 nanoSec = 670713940
curTime.s= 91 nanoSec = 680908940
curTime.s= 91 nanoSec = 690173600
curTime.s= 91 nanoSec = 700377960
curTime.s= 91 nanoSec = 710261240
curTime.s= 91 nanoSec = 720498140
curTime.s= 91 nanoSec = 730115280
curTime.s= 91 nanoSec = 740327480
curTime.s= 91 nanoSec = 750554900
curTime.s= 91 nanoSec = 760806900
curTime.s= 91 nanoSec = 771038420
curTime.s= 91 nanoSec = 780301520
curTime.s= 91 nanoSec = 790523040
curTime.s= 91 nanoSec = 800720420
curTime.s= 91 nanoSec = 810905400
curTime.s= 91 nanoSec = 820634140
curTime.s= 91 nanoSec = 830120860
curTime.s= 91 nanoSec = 840568980
curTime.s= 91 nanoSec = 850783440
curTime.s= 91 nanoSec = 860977400
curTime.s= 91 nanoSec = 870098360
curTime.s= 91 nanoSec = 880151500
curTime.s= 91 nanoSec = 890599720
curTime.s= 91 nanoSec = 900811620
curTime.s= 91 nanoSec = 910304900
curTime.s= 91 nanoSec = 951015200
curTime.s= 91 nanoSec = 960279420
curTime.s= 91 nanoSec = 970366480
curTime.s= 91 nanoSec = 980425660
curTime.s= 91 nanoSec = 990636840

Timestamp output inside 1millisec expiry event callback(in libevent 2.0.22)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curtime sec= 119, nanosec=149242140
curtime sec= 119, nanosec=150288680
curtime sec= 119, nanosec=151330020
curtime sec= 119, nanosec=152368900
curtime sec= 119, nanosec=153407060
curtime sec= 119, nanosec=154443960
curtime sec= 119, nanosec=155480260
curtime sec= 119, nanosec=156518900
curtime sec= 119, nanosec=157555540
curtime sec= 119, nanosec=158592120
curtime sec= 119, nanosec=159628520
curtime sec= 119, nanosec=160665600
curtime sec= 119, nanosec=161703780
curtime sec= 119, nanosec=162739960
curtime sec= 119, nanosec=163776660
curtime sec= 119, nanosec=164812800
curtime sec= 119, nanosec=165848440
curtime sec= 119, nanosec=166888440
curtime sec= 119, nanosec=167925580
curtime sec= 119, nanosec=168961360
curtime sec= 119, nanosec=169996580
curtime sec= 119, nanosec=171054640
curtime sec= 119, nanosec=172096200
curtime sec= 119, nanosec=173134840
curtime sec= 119, nanosec=174171900
curtime sec= 119, nanosec=175208660
curtime sec= 119, nanosec=176244720
curtime sec= 119, nanosec=177283760
curtime sec= 119, nanosec=178320160
curtime sec= 119, nanosec=179355320
curtime sec= 119, nanosec=180392900
curtime sec= 119, nanosec=181429440
curtime sec= 119, nanosec=182466720
curtime sec= 119, nanosec=183502540
curtime sec= 119, nanosec=184537540
curtime sec= 119, nanosec=185572880
curtime sec= 119, nanosec=186608180
curtime sec= 119, nanosec=187649560
curtime sec= 119, nanosec=188691320
curtime sec= 119, nanosec=189729560
curtime sec= 119, nanosec=190790820
curtime sec= 119, nanosec=191973380
curtime sec= 119, nanosec=193015160
curtime sec= 119, nanosec=194051560
curtime sec= 119, nanosec=195087980
curtime sec= 119, nanosec=196124080
curtime sec= 119, nanosec=197160140
curtime sec= 119, nanosec=198198820
curtime sec= 119, nanosec=199235520
curtime sec= 119, nanosec=200274040
curtime sec= 119, nanosec=201314580
curtime sec= 119, nanosec=202352900
curtime sec= 119, nanosec=203394540
curtime sec= 119, nanosec=204434240
curtime sec= 119, nanosec=205472600
curtime sec= 119, nanosec=206509400
curtime sec= 119, nanosec=207550720
curtime sec= 119, nanosec=208639980
curtime sec= 119, nanosec=209676620
curtime sec= 119, nanosec=210713600
curtime sec= 119, nanosec=211858860
curtime sec= 119, nanosec=212897600
curtime sec= 119, nanosec=213935940
curtime sec= 119, nanosec=214971620
curtime sec= 119, nanosec=216007600
curtime sec= 119, nanosec=217044720
curtime sec= 119, nanosec=218081480
curtime sec= 119, nanosec=219118760
curtime sec= 119, nanosec=220157140
curtime sec= 119, nanosec=221208800
curtime sec= 119, nanosec=222244720
curtime sec= 119, nanosec=223280780
curtime sec= 119, nanosec=224320380
curtime sec= 119, nanosec=225359280
curtime sec= 119, nanosec=226395980
curtime sec= 119, nanosec=227431720
curtime sec= 119, nanosec=228467420
curtime sec= 119, nanosec=229505340
curtime sec= 119, nanosec=230542780
curtime sec= 119, nanosec=231579460
curtime sec= 119, nanosec=232615460
curtime sec= 119, nanosec=233650900
curtime sec= 119, nanosec=234688640
curtime sec= 119, nanosec=235725120
curtime sec= 119, nanosec=236761760
curtime sec= 119, nanosec=237797140
curtime sec= 119, nanosec=238833460
curtime sec= 119, nanosec=239872620
curtime sec= 119, nanosec=240912240
curtime sec= 119, nanosec=242107460
curtime sec= 119, nanosec=243146760
.
.