I''ve been experiencing some unexpected results with regards to the memory performance of a domU virtual machine. I''m hoping that someone with a little more familiarity with Xen can shed some light on why I might be seeing this behavior. The scenario is as follows... I have a program that runs in dom0 and maps some kernel memory from domU (the memory that I''m mapping holds the system call table). Once the memory is mapped, I run in a loop and compare the table against a known good value for the table. I have the loop setup so that I can adjust how frequently the memory comparison is made. The weird thing is that when I make the comparison continuously (i.e., no sleep between comparisons), the memory performance of domU actually increases compared to a baseline without my memory checker running at all. In fact, using a sleep of 0.5sec or 1.0sec still creates a faster memory benchmark in domU. Once I get to a sleep interval of 1.5sec or greater, the memory benchmark is finally slower than the baseline. Some more details for those that are interested: * You can view the data in graph form at http://www.cc.gatech.edu/ ~bdpayne/notes/copy.pdf. * I''m using the stream memory benchmark. The data that I show in the graph above is for copy, but similar trends are seen for scale, add, and triad. * Each point in the graph is an average of 3000 benchmark tests, taken in 3 sets of 1000 tests where each test in the 1000 was separated by 2 seconds. * The bars in the graph indicate the statistical error interval for each set of 3000 benchmarks * Note that there is more variability in the measurements from the continuous test than the tests with some sleep interval inserted in the loop (wider error interval) These results were somewhat counter-intuitive to me as I didn''t expect memory performance to improve while I was doing extra monitoring. Does anyone have some thoughts on why I''d be seeing this behavior? I''m happy to provide additional data if that''s helpful. Thanks, bryan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 14 Nov 2005, at 04:26, Bryan D. Payne wrote:> I''ve been experiencing some unexpected results with regards to the > memory performance of a domU virtual machine. I''m hoping that someone > with a little more familiarity with Xen can shed some light on why I > might be seeing this behavior. The scenario is as follows...What CPUs are the domains running on? This is most likely an artefact of the machine architecture, and nothing to do with Xen. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> What CPUs are the domains running on? This is most likely an > artefact of the machine architecture, and nothing to do with Xen.Interesting. The system is running with a single AMD Athlon 64 3500+ processor (note that both dom0 and domU are compiled as 32-bit systems). There is a total of 2GB of RAM in the system, I have 1500 allocated to dom0 and 256 to domU. I had been contemplating this being an artifact of the system, but couldn''t come up with any reasonable explanation in my mind. It just seems off that if one program is being a resource hog, the other wouldn''t speed up. However, I couldn''t help but wonder if this was somehow stressing Xen in such a way as to cause some unusual behavior. Anyway, if it''s not Xen, then I shall keep looking elsewhere :-) Thanks, -bryan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
The only thing I could imagine is that maybe Xen incorrectly schedules the idle domain at some points, and that stops happening if you run two domains against each other. That would be a pretty stupid scheduling bug though and I''m pretty sure it''s not happening. -- Keir On 14 Nov 2005, at 13:41, Bryan D. Payne wrote:>> What CPUs are the domains running on? This is most likely an artefact >> of the machine architecture, and nothing to do with Xen. > > Interesting. The system is running with a single AMD Athlon 64 3500+ > processor (note that both dom0 and domU are compiled as 32-bit > systems). There is a total of 2GB of RAM in the system, I have 1500 > allocated to dom0 and 256 to domU. > > I had been contemplating this being an artifact of the system, but > couldn''t come up with any reasonable explanation in my mind. It just > seems off that if one program is being a resource hog, the other > wouldn''t speed up. However, I couldn''t help but wonder if this was > somehow stressing Xen in such a way as to cause some unusual behavior. > Anyway, if it''s not Xen, then I shall keep looking elsewhere :-) > > Thanks, > -bryan_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>From: Bryan D. Payne >Sent: 2005年11月14日 21:42 > >> What CPUs are the domains running on? This is most likely an >> artefact of the machine architecture, and nothing to do with Xen. > >Interesting. The system is running with a single AMD Athlon 64 3500+ >processor (note that both dom0 and domU are compiled as 32-bit >systems). There is a total of 2GB of RAM in the system, I have 1500 >allocated to dom0 and 256 to domU. > >I had been contemplating this being an artifact of the system, but >couldn''t come up with any reasonable explanation in my mind. It just >seems off that if one program is being a resource hog, the other >wouldn''t speed up. However, I couldn''t help but wonder if this was >somehow stressing Xen in such a way as to cause some unusual >behavior. Anyway, if it''s not Xen, then I shall keep looking >elsewhere :-) > >Thanks, >-bryanHow about make a test by simply loop without compare stuff? If that infinite loop without doing actual job also has same effect as what you see, maybe we can put the light on schedule stuff (both dom0 and domU on same UP). The direct result of your experiment is that dom0 gets more chance to run... Maybe that indicates dom0 can service more requests from domU under some conditions? Thanks, Kevin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel