At Thu, 3 Apr 2025 15:41:13 +0000, Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote: Subject: Re: PHP performance on Xen domU with mulitple vcpu > > On Thu, Apr 03, 2025 at 11:00:50AM -0400, Greg Troxel wrote: > > Have you written a test program to log and examined the return values? > > I ran gettimeofday 1M time, it took 5.12, which is much faster than > what happens in PHP. Here is the distribution of results: > > count value > 239726 1743694322.907498 > 119400 1743694324.187487 > 327599 1743694325.467476 > 174425 1743694326.747465 > 138850 1743694328.027453 > > > Is xen somehow using a timecounter that is incrementing in larger jumps? > > Oh, yes, good pick! I use kern.timecounter.hardware=clockinterrupt > because with xen_system_time the domU's ntpd is unable to keep in sync. > > With kern.timecounter.hardware=xen_system_time, the uniqid() test runs > at normal speed. Ah ha. So it's not really so much of a "performance problem", as it is a system timekeeping problem -- possibly the same one everyone else is having.... So which Xen kernel version is this with? My bet is that it's newer than 4.11. Also which exact CPU model is your system using? It is interesting that setting kern.timecounter.hardware=clockinterrupt is enough to work around the ntpd problem -- I'll try that for the similar problems I've been having with Xen kernels >= 4.18. -- Greg A. Woods <gwoods%acm.org@localhost> Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost> Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgp8sz8IdYj_Q.pgp
Description: OpenPGP Digital Signature