[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Add a timer mode that disables pending missed ticks
Hi Dan, Thanks for all the investigation you've done! -Dave Dan Magenheimer wrote: Hi Dave -- Thanks for that observation on ltp running on one vcpu! With "clocksource=pit nohpet nopmtimer" our clock skew problems seem to have been reduced to a reasonable percentage. However, our 32-bit clock skew seems to show a measureable problem now. For the 32 bit guest, which timesource did it pick? As a result, I've been doing some digging into kernel sources and have observed the following relative to RHEL4 (2.6.9-based) kernels and RHEL5 (2.6.18-based) kernels and thought I would document them for posterity. Some of our confusion arises from the fact that invalid command line parameters are silently ignored. RHEL4: - clock= is a valid parameter for RHEL4-32 - clocksource= is not a valid parameter for RHEL4-xx - nohpet is a valid parameter for RHEL4-64, not RHEL4-32 - nopmtimer is not a valid parameter for RHEL4-xx - notsc is a valid parameter for RHEL4-32, not RHEL4-64 - SMP vs UP RHEL4-64 reports timekeeping in dmesg differently For Xen RHEL4 HVM guests: - I *think* clock=pit is sufficient for RHEL4-32 [1] - I *think* nohpet is sufficient for RHEL4-64 [1] RHEL5: - there are two kinds of timekeeping, WALL and gtod - clocksource= is a valid parameter for RHEL5-xx - clock= is a valid but deprecated parameter for RHEL5-xx - clock= and clocksource= are essentially equivalent - nohpet is a valid parameter for RHEL5-64, not RHEL5-32 - nopmtimer is a valid parameter for RHEL5-64, not RHEL5-32 - notsc is a valid parameter for RHEL5-64, not RHEL5-32 [1] - clock=pit changes the gtod source but not the WALL source[2] - nohpet nopmtimer changes the WALL source to PIT - /sys/devices/system/clocksource/clocksource0/... available_clocksource lists the possible clock sources current_clocksource lists the chosen clock source ..but neither of these works in a RHEL5 guest! For Xen RHEL5 HVM guests: - I *think* clock=pit is sufficient for RHEL5-32 But still poor accuracy, right? - I *think* clock=pit nohpet nopmtimer is sufficient for RHEL5-64 Other info: - As of 2.6.24.2, clock= is still valid (though still deprecated) So, some open questions: [1] Is notsc necessary for proper ticks for RHEL4-32/RHEL5-64? (I *think* not as it has never come up in any email.) I have not investigated this yet. [2] In RHEL5, I *think* it is the WALL source that we care about? I'll have to check on this too. And finally, since invalid command line parameters are ignored. I think specifying: clock=pit nohpet nopmtimer will force the guest clock sources into the optimal state for all RHEL4 and RHEL5 both 32-bit and 64-bit guests (though see the question above on tsc). And we should keep an eye on kernel/time/clocksource.c to ensure the __setup("clock="...) line doesn't go away before RHEL6. Note that if hpet=0 and pmtimer=0 were the default hvm platform parameters for all xen hvm guests (on all versions of xen), specifying kernel command line parameters would be unnecessary, but c'est la vie. Oh, and to be complete, timer_mode=0 for 32-bit RHEL guests and timer_mode=2 for 64-bit RHEL guests. Thanks, Dan-----Original Message----- From: Dave Winchell [mailto:dwinchell@xxxxxxxxxxxxxxx] Sent: Tuesday, February 19, 2008 8:27 AM To: dan.magenheimer@xxxxxxxxxx Cc: Dave Winchell; Keir Fraser; xen-devel@xxxxxxxxxxxxxxxxxxx; Deepak PatelSubject: Re: [Xen-devel] [PATCH] Add a timer mode that disables pendingmissed ticks Hi Dan, ltp runs by default loading up only one vcpu. The -x option can be used to run multiple instances, though in this mode you will get test failures. I ran 8 instances on each guest for 16 hours, 25 min and the time error was -11 sec (-.019%) on each guest. Regards, Dave Dave Winchell wrote:Hi Dan, Mine was oversubscribed. 8 physical cpu, 2 guests, each with 8 vcpu. I ran one instance of ltp on each guest, continuously. I hope ltp loaded up all the vcpus. I seem to recall that it did, but I could be wrong. If it didn't, that would be a major differencebetween our tests. I'll verify this afternoon and runmultiple instances,if necessary. Thanks, Dave Dan Magenheimer wrote:Hi Dave -- No new results yet but one other question: The problems we've seen with our testing have been with a heavily oversubscribed system: 8 physical CPU, six 2-vcpu 2GB guests running LTP simultaneously. Was your LTP testing oversubscribed or just a single guest? Thanks, Dan-----Original Message----- From: Dave Winchell [mailto:dwinchell@xxxxxxxxxxxxxxx] Sent: Thursday, February 14, 2008 10:56 AM To: dan.magenheimer@xxxxxxxxxx Cc: Keir Fraser; xen-devel@xxxxxxxxxxxxxxxxxxx; Deepak Patel; Dave WinchellSubject: Re: [Xen-devel] [PATCH] Add a timer mode thatdisables pendingmissed ticks Dan, Here are some boot snipets for rh4u564 on xen 3.2. #1: Feb 14 10:44:59 vs076 kernel: Bootdata ok (command line is ro root=LABEL=/ console=ttyS0 clocksource=pit nohpet) Feb 14 10:44:59 vs076 kernel: Linux version 2.6.9-55.ELsmp(brewbuilder@xxxxxxxxxxxxxxxxxxxxxxxxxxx) (gcc version3.4.6 20060404(Red Hat 3.4.6-3)) #1 SMP Fri Apr 20 16:36:54 EDT 2007 ... Feb 14 10:44:59 vs076 kernel: Kernel command line: ro root=LABEL=/ console=ttyS0 clocksource=pit nohpet Feb 14 10:44:59 vs076 kernel: Initializing CPU#0Feb 14 10:44:59 vs076 kernel: PID hash table entries:2048 (order: 11,65536 bytes) Feb 14 10:44:59 vs076 kernel: time.c: Using 3.579545 MHz PM timer.Feb 14 10:44:59 vs076 kernel: time.c: Detected 1992.050MHz processor....Feb 14 10:45:00 vs076 kernel: checking TSCsynchronization across 8CPUs: passed. Feb 14 10:45:00 vs076 kernel: Brought up 8 CPUsFeb 14 10:45:00 vs076 kernel: Disabling vsyscall due touse of PM timerFeb 14 10:45:00 vs076 kernel: time.c: Using PM based timekeeping. #2: Feb 14 10:47:57 vs076 kernel: Bootdata ok (command line is ro root=LABEL=/ console=ttyS0 clocksource=pit nohpet nopmtimer) Feb 14 10:47:57 vs076 kernel: Linux version 2.6.9-55.ELsmp(brewbuilder@xxxxxxxxxxxxxxxxxxxxxxxxxxx) (gcc version3.4.6 20060404(Red Hat 3.4.6-3)) #1 SMP Fri Apr 20 16:36:54 EDT 2007 ... Feb 14 10:47:58 vs076 kernel: Kernel command line: ro root=LABEL=/ console=ttyS0 clocksource=pit nohpet nopmtimer Feb 14 10:47:58 vs076 kernel: Initializing CPU#0Feb 14 10:47:58 vs076 kernel: PID hash table entries:2048 (order: 11,65536 bytes)Feb 14 10:47:58 vs076 kernel: time.c: Using 1.193182 MHzPIT timer.Feb 14 10:47:58 vs076 kernel: time.c: Detected 1991.959MHz processor....Feb 14 10:47:59 vs076 kernel: checking TSCsynchronization across 8CPUs: passed. Feb 14 10:47:59 vs076 kernel: Brought up 8 CPUsFeb 14 10:47:59 vs076 kernel: time.c: Using PIT/TSC basedtimekeeping.As you can see, I only get the pit if I specify nopmtimer. Dan Magenheimer wrote:Hi Dave -- Thanks for continuing to run tests! Hmmm... I thought I had noticed that even though Linux willacknowledgethe existence of the pmtimer, it still prints: time.c: Using PIT/TSC based timekeeping. I will check again, but assuming the clocksource for our tests is indeed pit, the huge difference in the results (yours vs ours) isbaffling. I wonder if the difference may be theunderlying hardware.Maybe we will try to ensure we can duplicate the results ona differentbox.So your testing was with stock 3.2.0 xen bits (whatcset?) withoutany of your [quote from below] "clock related tweaksthat I haven'tsubmitted, because I'm still characterizing them"?None of the tweaks I mentioned are in this test.It was stock with some patches. However, none of thepatches are timerelated tomy knowledge and I checked vpt.c to make sure that it isthe same aswhat's in unstable.The only difference is in pt_intr_post, where I set thetimer mode.I don't have timer mode tied into our config process yet, which is different than official xen method. (In pt_intr_post) else { + if(v->arch.paging.mode->guest_levels == 4)+v->domain->arch.hvm_domain.params[HVM_PARAM_TIMER_MODE] =HVMPTM_no_missed_ticks_pending; + else+v->domain->arch.hvm_domain.params[HVM_PARAM_TIMER_MODE] =HVMPTM_delay_for_missed_ticks; if ( mode_is(v->domain, one_missed_tick_pending) || mode_is(v->domain, no_missed_ticks_pending) ) {Could you also send detail on the rhel4u4-64 kernel you are testing with, just to ensure we are not comparing apples and oranges? (Perhaps there's some way we can even share the identical disk image and vm.cfg file?) And if our problem is indeed the pmtimer, I will need to submit another patch to Keir to add an hvm pmtimer platform variable. (Hmmm... I don't think he's even accepted the hpet variable patch yet. I'll have to check.) Thanks, Dan-----Original Message----- From: Dave Winchell [mailto:dwinchell@xxxxxxxxxxxxxxx] Sent: Thursday, February 14, 2008 9:00 AM To: dan.magenheimer@xxxxxxxxxx Cc: Dave Winchell; Keir Fraser;xen-devel@xxxxxxxxxxxxxxxxxxx; DeepakPatel Subject: Re: [Xen-devel] [PATCH] Add a timer mode that disables pending missed ticks Hi Dan, I ran the ltp tests with 3.2 and found the errors for a 16 hour run to be: rh4u564 -9.9 sec (-.017%) rh4u464 -7.3 sec (-.013%) There were no cliffs and the drift was linear. I think the problem you had may be due to the use of the pm timer. If you still have the boot log, it would tell you. When I first tried a guest on 3.2 with "clocksource=pit nohpet" I noticed that it picked the pm timer. Adding "nopmtimer", the guest will pick the pit. The reason I didn't have the problem with our 3.1 base is that I had disabled the hpet and the pmtimer by not advertising themin the acpi tables. I did this so long ago, I forgotthat I had todisable pmtimer as well as hpet. So, can you re-run your test with "clocksource=pit nohpetnopmtimer"?You should see this in the boot messages: time.c: Using PIT/TSC based timekeeping. Thanks, Dave Dave Winchell wrote:Hi Dan,Over the weekend the drift was +18 seconds for eachguest (no ntp).The duration was 3900 minutes, so the error for eachwas +.0077%.Looking back through the data, it appears to drift linearly at this rate. I've attached a plot for rh4u5-64. This accuracy is better than what I've seen before (.03-.05%). This may be due to the different load (ltp vs usex) or toone of thechanges I've made recently. I'll do someexperimentation to see ifthere is a fix I should propose. This still doesn't address the radical drift you saw.The next step for me is to run 3.2 and see if I canreproduce it.Regards, Dave Dave Winchell wrote:Hi Dan, Sorry it took me so long, but I finally ran an ltp test today.Its on rh4u4-64. I'm using the defaults for ltp andusing a scriptcalled runltp. I had a usex load on rh4u5-64. No ntpd. virtual processors / physical processors = 2.The clocks drifted -1 sec (4u5) and +1.5 sec (4u4) in300 minutesfor -.005% and .008%. I'm running a 3.1 based hypervisor with some clock relatedtweaks thatI haven't submitted, because I'm still characterizing them.I'm stopping the usex load on 4u5-64 now andreplacing it with ltpand will leave the two guests running ltp over the weekend. Regards, Dave Dave Winchell wrote:Hi Dan, Deepak: Thanks for the data. Those drifts are severe - no wonderntp couldn'tkeep then in synch. I'll try to reproduce that behaviourhere, withmy code base. If I can't reproduce it, I'll try 3.2. If you can isolate what ltp is doing during the cliffs,that wouldbe very helpful. thanks, Dave Dan Magenheimer wrote:OK, Deepak repeated the test without ntpd and usingntpdate -b beforethe test.The attached graph shows his results: el5u1-64(best=~0.07%),el4u5-64 (middle=~0.2%), and el4u5-32 (worst=~0.3%). We will continue to look at LTP to try to isolate. Thanks, Dan P.S. elXuY is essentially RHEL XuY with some patches.-----Original Message----- From: Dave Winchell [mailto:dwinchell@xxxxxxxxxxxxxxx] Sent: Wednesday, January 30, 2008 2:45 PM To: Deepak Patel Cc: dan.magenheimer@xxxxxxxxxx; Keir Fraser; xen-devel@xxxxxxxxxxxxxxxxxxx; akira.ijuin@xxxxxxxxxx;Dave WinchellSubject: Re: [Xen-devel] [PATCH] Add a timer modethat disablespending missed ticks Dan, Deeepak,It may be that the underlying clock error is toogreat for ntpto handle. It would be useful if you did not run ntpd and, instead did ntpdate -b <timeserver> at the startof the testfor each guest. Then capture the data as you havebeen doing.If the drift is greater than .05%, then we need toaddress that.Another option is, when running ntpd, to enable loopstatistics in/etc/ntp.conf by adding this to the file: statistics loopstats statsdir /var/lib/ntp/ Then you will see loop data in that directory. Correlating the data in the loopstats files with the peaks in skew would be interesting. You will seeentries of the form54495 76787.701 -0.045153303 -132.569229 0.020806776239.735511 10Where the second to last column is the Allan Deviation.When thatgets over 1000, ntpd is working pretty hard. However,I have notseen ntpd completely loose it like you have. I'm on vacation until Monday, and won't be reading email. Thanks for all your work on this! -Dave Deepak Patel wrote:Is the graph for RHEL5u1-64? (I've never testedthis one.)I do not know which graph was attached with this. ButI saw thisbehavior in EL4u5 - 32, EL4U5 - 64 and EL5U1 - 64 hvmguests when Iwas running ltp tests continuously.What was the behaviour of the other guests running?All pvm guests are fine. But behavior of most of thehvm guests wereas described.If they had spikes, were they at the same wall time?No. They are not at the same wall time.Yes all 6 guests (4 hvm and 2 pvm) the guests areWere the other guests running ltp as well?running ltpcontinuously.How are you measuring skew?I was collecting output of "ntpdate -q <timeserver> every300 seconds(5 minutes) and have created graph based on that.Are you running ntpd?Yes. ntp was running on all the guests.I am investigating what causes this spikes andlet everyoneknow whatare my findings. Thanks, DeepakAnything that you can discover that would be in sync with the spikes would be very helpful!The code that I test with is our product code,which is basedon 3.1. So it is possible that something in 3.2 otherthan vpt.cis the cause. I can test with 3.2, if necessary. thanks, Dave Dan Magenheimer wrote:Hi Dave (Keir, see suggestion below) -- Thanks!Turning off vhpet certainly helps a lot (thoughsee below).I wonder if timekeeping with vhpet is so bad that itshould beturned off by default (in 3.1, 3.2, and unstable)until it isfixed? (I have a patch that defaults it off,can post it ifthere is agreement on the above point.) The wholepoint of anHPET is to provide more precise timekeeping andif vhpet isworse than vpit, it can only confuse users. Comments?In your testing, are you just measuring % skewover a longperiod of time? We are graphing the skew continuously andseeing periodic behavior that is unsettling,even with pit.See attached. Though your algorithm recovers,the "cliffs"could still cause real user problems. I wonderif there isanything that can be done to make the "recovery" more responsive? We are looking into what part(s) of LTP is causingthe cliffs.Thanks, Dan-----Original Message----- From: Dave Winchell [mailto:dwinchell@xxxxxxxxxxxxxxx] Sent: Monday, January 28, 2008 8:21 AM To: dan.magenheimer@xxxxxxxxxx Cc: Keir Fraser; xen-devel@xxxxxxxxxxxxxxxxxxx; deepak.patel@xxxxxxxxxx; akira.ijuin@xxxxxxxxxx; Dave Winchell Subject: Re: [Xen-devel] [PATCH] Add a timer modethat disablespending missed ticks Dan, I guess I'm a bit out of date calling for clock= usage. Looking at linux 2.6.20.4 sources, I think youshould specify"clocksource=pit nohpet" on the linux guest bootline. You can leave the xen and dom0 bootlines as they are.The xen and guest clocksources do not need tobe the same.In my tests, xen is using the hpet for itstimekeeping andthat appears to be the default. When you boot the guests you should see time.c: Using PIT/TSC based timekeeping.on the rh4u5-64 guest, and something similaron the others.(xm dmesg shows 8x Xeon 3.2GHz stepping 04,Platform timer14.318MHz HPET.)This appears to be the xen state, which is fine. I was wrongly assuming that this was the guest state. You might want to look in your guest logs and seewhat they werepicking for a clock source. Regards, Dave Dan Magenheimer wrote:Thanks, I hadn't realized that! No wonder we didn'tsee the sameimprovement you saw!I'm confused... do you mean "clocksource=pit"Try specifying clock=pit on the linux boot line...on the Xencommand line or"nohpet" / "clock=pit" / "clocksource=pit" on theguest (ordom0?) commandline? Or both places? Since the tests takeawhile, itwould be niceto get this right the first time. Do the Xenand guestclocksources needto be the same? Thanks, Dan -----Original Message-----*From:* Dave Winchell[mailto:dwinchell@xxxxxxxxxxxxxxx]*Sent:* Sunday, January 27, 2008 2:22 PM *To:* dan.magenheimer@xxxxxxxxxx; Keir Fraser *Cc:* xen-devel@xxxxxxxxxxxxxxxxxxx;deepak.patel@xxxxxxxxxx;akira.ijuin@xxxxxxxxxx; Dave Winchell *Subject:* RE: [Xen-devel] [PATCH] Add a timer modethat disablespending missed ticks Hi Dan, Hpet timer does have a fairly large error, as I wastrying thisone recently. I don't remember what I got for error, but 1% soundsabout right.The problem is that hpet is not built on top of vpt.c,the moduleKeir and I did all the recent work in, for its periodic timerneeds. Tryspecifying clock=pit on the linux boot line. If it still picks thehpet, which itmight, let me know and I'll tell you how to get around this. Regards, Dave------------------------------------------------------------------------*From:* Dan Magenheimer[mailto:dan.magenheimer@xxxxxxxxxx]*Sent:* Fri 1/25/2008 6:50 PM *To:* Dave Winchell; Keir Fraser *Cc:* xen-devel@xxxxxxxxxxxxxxxxxxx;deepak.patel@xxxxxxxxxx;akira.ijuin@xxxxxxxxxx *Subject:* RE: [Xen-devel] [PATCH] Add a timer modethat disablespending missed ticksSorry for the very late followup on this butwe finallywere ableto get our testing set up again on stable 3.1bits and haveseen some very bad results on 3.1.3-rc1, on theorder of 1%.Test enviroment was a 4-socket dual core machinewith 24GB ofmemory running six two-vcpu 2GB domains, four hvmplus two pv.All six guests were running LTP simultaneously.The four hvmguests were: RHEL5u1-64, RHEL4u5-32, RHEL5-64, andRHEL4u5-64.Timer_mode was set to 2 for 64-bit guests and 0 for32-bit guests.All four hvm guests experienced skew around -1%,even the 32-bitguest. Less intensive testing didn't exhibit muchskew at all.A representative graph is attached. Dave, I wonder if some portion of your patchesdidn't end up inthe xen trees? (xm dmesg shows 8x Xeon 3.2GHz stepping 04,Platform timer14.318MHz HPET.) Thanks, DanP.S. Many thanks to Deepak and Akira forrunning tests.-----Original Message----- From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf OfDave Winchell Sent: Wednesday, January 09, 2008 9:53 AM To: Keir Fraser Cc: dan.magenheimer@xxxxxxxxxx;xen-devel@xxxxxxxxxxxxxxxxxxx; DaveWinchellSubject: Re: [Xen-devel] [PATCH] Add atimer mode thatdisables pending missed ticks Hi Keir, The latest change, c/s 16690, looks fine. I agree that the code in c/s 16690 is equivalent to the code I submitted. Also, your version is more concise. The error tests confirm the equivalence. Withovernight cpu loads,the checked in version was accurate to+.048% for slesand +.038% for red hat. My version was +.046%and+.032% in a2 hour test. I don't think the difference is significant. i/o loads produced errors of +.01%. Thanks for all your efforts on this issue. Regards, Dave Keir Fraser wrote:Applied as c/s 16690, although thechecked-in patch issmaller. I think theonly important fix is to pt_intr_post() and theonly bit ofthe patch Itotally omitted was the change topt_process_missed_ticks().I don't thinkthat change can be important, but let's see whathappens to theerrorpercentage... -- Keir On 4/1/08 23:24, "Dave Winchell"<dwinchell@xxxxxxxxxxxxxxx> wrote:Hi Dan and Keir,Attached is a patch that fixes someissues with theSYNC policy(no_missed_ticks_pending). I have not tried to make the change theminimal one, but,rather, justported intothe new code what I know to work well.The error forno_missed_ticks_pending goes from over 3% to .03% with this change accordingto my testing.Regards, Dave Dan Magenheimer wrote:Hi Dave -- Did you get your correction ported? If so,it would benice to see this getinto 3.1.3.Note that I just did some very limitedtesting withtimer_mode=2(=SYNC=nomissed ticks pending) on tip of xen-3.1-testing (64-bit Linux hvguest) and theworst error I'veseen so far is 0.012%. But I haven't tried any exoticloads, just LTP.Thanks, Dan-----Original Message----- From: Dave Winchell[mailto:dwinchell@xxxxxxxxxxxxxxx]Sent: Wednesday, December 19, 2007 12:33 PM To: dan.magenheimer@xxxxxxxxxx Cc: Keir Fraser; Shan, Haitao;xen-devel@xxxxxxxxxxxxxxxxxxx; Dong,Eddie; Jiang, Yunhong; Dave Winchell Subject: Re: [Xen-devel] [PATCH] Add atimer mode thatdisables pending missed ticks Dan, I did some testing with the constant tsc offsetSYNC method(now called no_missed_ticks_pending) and found the error to be very high, much largerthan 1 %, asI recall.I have not had a chance to submit acorrection. Iwill try todo it later this week or the first week in January. Myversion ofconstant tscoffset SYNC method produces .02 % error, so I just need to portthat into thecurrent code. The error you got for both of those kernels iswhat I wouldexpectfor the default mode, delay_for_missed_ticks.I'll let Keir answer on how to set thetime mode.Regards, Dave Dan Magenheimer wrote:Anyone make measurements on the final patch? I just ran a 64-bit RHEL5.1 pvm kernel andsaw a loss ofabout 0.2% with no load. This wasxen-unstable tip todaywith no options specified. 32-bit wasabout 0.01%.I think I missed something... how do Irun the variousaccounting choices and which ones areknown to beappropriatefor which kernels?Thanks, Dan-----Original Message----- From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf OfKeir FraserSent: Thursday, December 06, 2007 4:57 AM To: Dave Winchell Cc: Shan, Haitao;xen-devel@xxxxxxxxxxxxxxxxxxx; Dong,Eddie; Jiang,Yunhong Subject: Re: [Xen-devel] [PATCH] Add a timermode thatdisables pending missed ticks Please take a look at xen-unstablechangeset 16545.-- Keir On 26/11/07 20:57, "Dave Winchell"<dwinchell@xxxxxxxxxxxxxxx> wrote:Keir, The accuracy data I've collected for i/oloads for thevarious time protocols follows. Inaddition, the datafor cpu loads is shown. The loads labeled cpu and i/o-8 are on an 8processor AMDbox.Two guests, red hat and sles 64 bit, 8vcpu each.The cpu load is usex -e36 on each guest. (usex is available athttp://people.redhat.com/anderson/usex.)i/o load is 8 instances of dd if=/dev/hda6of=/dev/null.The loads labeled i/o-32 are 32instances of dd.Also, these are run on 4 cpu AMD box. In addition, there is an idle rh-32bit guest. All three guests are 8vcpu. The loads labeled i/o-4/32 are the sameas i/o-32except that the redhat-64 guest has 4instances of dd.Date Duration Protocol sles, rhat error load 11/07 23 hrs 40 min ASYNC -4.96 sec,+4.42sec -.006%,+.005% cpu11/09 3 hrs 19 min ASYNC -.13 sec, +1.44sec, -.001%,+.012% cpu11/08 2 hrs 21 min SYNC -.80 sec, -.34sec, -.009%,-.004% cpu11/08 1 hr 25 min SYNC -.24 sec, -.26 sec,-.005%, -.005% cpu11/12 65 hrs 40 min SYNC -18 sec, -8 sec,-.008%, -.003% cpu11/08 28 min MIXED -.75 sec, -.67 sec -.045%,-.040% cpu11/08 15 hrs 39 min MIXED -19. sec,-17.4sec, -.034%,-.031% cpu11/14 17 hrs 17 min ASYNC -6.1sec,-55.7 sec, -.01%,-.09% i/o-811/15 2 hrs 44 min ASYNC -1.47sec,-14.0 sec, -.015%-.14% i/o-811/13 15 hrs 38 min SYNC -9.7 sec,-12.3sec, -.017%,-.022% i/o-811/14 48 min SYNC - .46 sec, - .48 sec,-.017%, -.018% i/o-811/14 4 hrs 2 min MIXED -2.9 sec, -4.15sec, -.020%,-.029% i/o-811/20 16 hrs 2 min MIXED -13.4 sec,-18.1sec, -.023%,-.031% i/o-811/21 28 min MIXED -2.01 sec, -.67sec, -.12%,-.04% i/o-3211/21 2 hrs 25 min SYNC -.96 sec, -.43sec, -.011%,-.005% i/o-3211/21 40 min ASYNC -2.43 sec, -2.77sec -.10%,-.11% i/o-3211/26 113 hrs 46 min MIXED -297. sec,13. sec -.07%,.003% i/o-4/3211/26 4 hrs 50 min SYNC -3.21 sec, 1.44sec, -.017%,.01% i/o-4/32Overhead measurements: Progress in terms of number of passesthrough a fixedsystem workloadon an 8 vcpu red hat with an 8 vcpusles idle.The workload was usex -b48. ASYNC 167 min 145 passes .868 passes/min SYNC 167 min 144 passes .862 passes/min SYNC 1065 min 919 passes .863 passes/min MIXED 221 min 196 passes .887 passes/min Conclusions:The only protocol which meets the.05% accuracyrequirement for ntptracking under the loads above is the SYNC protocol. The worst caseaccuracies forSYNC, MIXED,and ASYNC are .022%, .12%, and .14%, respectively. We could reduce the cost of the SYNCmethod by onlyscheduling the extrawakeups if a certain number of ticks are missed. Regards, Dave Keir Fraser wrote:On 9/11/07 19:22, "Dave Winchell"<dwinchell@xxxxxxxxxxxxxxx> wrote:Since I had a high error (~.03%) for theASYNC method acouple of days ago,I ran another ASYNC test. I thinkthere may havebeen somethingwrong with the code I used a couple ofdays ago forASYNC. It may have beenmissing the immediate delivery of interruptafter contextswitch in.My results indicate that either SYNCor ASYNC giveacceptable accuracy,each running consistently around or under.01%. MIXED hasa fairly higherror of greater than .03%. Probably too closeto .05% ntpthreshold for comfort.I don't have an overnight run with SYNC. Iplan to leaveSYNC runningover the weekend. If you'd rather I canleave MIXEDrunning instead.It may be too early to pick theprotocol andI can runmore overnight testsnext week.I'm a bit worried about any unwanted sideeffects of theSYNC+run_timerapproach -- e.g., whether timer wakeups willcause highersystem-wide CPUcontention. I find it easier to thinkthrough theimplications of ASYNC. I'msurprised that MIXED loses time, and is lessaccurate thanASYNC. Perhaps itdelivers more timer interrupts thanthe otherapproaches,and each interruptevent causes a small accumulated error? Overall I would consider MIXED and ASYNC asfavourites andif the latter isactually more accurate then I cansimply revert thechangeset thatimplemented MIXED. Perhaps rather than running more of the sameworkloads youcould try idleVCPUs and I/O bound VCPUs (e.g., repeatedlarge disc readsto /dev/null)? Wedon't have any data on workloads that aren'tCPU bound, sothat's really anobvious place to put any further effort imo. -- Keir_______________________________________________Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-develdiff -r cfdbdca5b831 xen/arch/x86/hvm/vpt.c --- a/xen/arch/x86/hvm/vpt.c Thu Dec 06 15:36:072007 +0000+++ b/xen/arch/x86/hvm/vpt.c Fri Jan 04 17:58:162008 -0500@@ -58,7 +58,7 @@ static voidpt_process_missed_ticks(strumissed_ticks = missed_ticks / (s_time_t)pt->period + 1;if ( mode_is(pt->vcpu->domain,no_missed_ticks_pending) )- pt->do_not_freeze = !pt->pending_intr_nr; + pt->do_not_freeze = 1; else pt->pending_intr_nr += missed_ticks; pt->scheduled += missed_ticks * pt->period; @@ -127,7 +127,12 @@ static voidpt_timer_fn(void *data)pt_lock(pt); - pt->pending_intr_nr++; + if ( mode_is(pt->vcpu->domain,no_missed_ticks_pending) ) {+ pt->pending_intr_nr = 1; + pt->do_not_freeze = 0; + } + else + pt->pending_intr_nr++; if ( !pt->one_shot ) { @@ -221,8 +226,6 @@ void pt_intr_post(structvcpu *v, structreturn; } - pt->do_not_freeze = 0; - if ( pt->one_shot ) { pt->enabled = 0; @@ -235,6 +238,10 @@ void pt_intr_post(struct vcpu*v, structpt->last_plt_gtime =hvm_get_guest_time(v);pt->pending_intr_nr = 0; /*'collapse' allmissed ticks */} + else if ( mode_is(v->domain,no_missed_ticks_pending) ) {+ pt->pending_intr_nr--; + pt->last_plt_gtime = hvm_get_guest_time(v); + } else { pt->last_plt_gtime +=pt->period_cycles;_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel-------------------------------------------------------------- ---------- _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |