LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices



Reply
 
Search this Thread
Old 11-19-2011, 06:20 PM   #1
sparsh0mittal
LQ Newbie
 
Registered: Nov 2011
Posts: 23

Rep: Reputation: Disabled
Deterministic simulation using qemu-based simulator


I am using Marss cycle-accurate simulator, which uses QEMU. It is a full system simulator and gives both user and kernel stats. However, even if I take only user-stats, the statistics vary a lot between different runs. I have asked this question on marss site, but could not get good answer.

I was wondering if it has something to do with qemu. Or any qemu option, that can make simulation deterministic. I tried using -icount auto and still some variation is there. Is qemu affected by load at the host system? With simplescalar eio files, I have never observed any variation. I would be grateful for some help.
 
Old 11-19-2011, 08:23 PM   #2
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 209

Rep: Reputation: 66
A shot in the dark: does the virtual OS track the real wall clock? If so, more host load would equal fewer virtual instructions completed per virtual timer tick, and the increased virtual L1 cache interference would affect virtual user mode.
 
1 members found this post helpful.
Old 11-20-2011, 09:08 AM   #3
sparsh0mittal
LQ Newbie
 
Registered: Nov 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
Seeking Clarification

Thanks for answering. Could you explain it a bit further? I could not grasp the answer.
Sparsh
 
Old 11-20-2011, 10:49 AM   #4
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 209

Rep: Reputation: 66
You mentioned kernel mode and that excluding it made some difference to your stats, so I inferred your simulated machine makes steady use of kernel mode i.e. has some sort of real OS in the simulation. Most OS's offer wall-clock timing service and have at least some wall-clock interrupts even at idle, one-per-second or some such, so if yours does offer that it's using at least some of its simulated cycles taking those interrupts. I see your simulator manages 200K instructions per second on a not-too-shabby host, so whatever simulated timer overhead there is is coming out of a very small budget -- and as your host gets busy, that budget drops proportionately. You mentioned that even just counting instruction completions in user mode you were still getting "some" variation, so I thought you might be comparing that variation against what you get when counting clock cycles instead. Completing fewer ips on the same workload means cache interference, again pointing to higher interference from interrupts.

All of that is pretty much guaranteed wrong if your simulated system isn't tracking the real wall clock, and even for the rest I know real systems not simulated ones. Thus my shot-in-the-dark caution.
 
1 members found this post helpful.
Old 11-20-2011, 12:00 PM   #5
sparsh0mittal
LQ Newbie
 
Registered: Nov 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jthill View Post
You mentioned kernel mode and that excluding it made some difference to your stats,
Thanks. Actually what I meant is that if I run same simulation (same configuration and same number of instructions) two times and take kernel+ user stats they differ b/w two simulations.

Moreover, if I run same simulation (same configuration and same number of instructions) two times and take just user stats they differ b/w two simulations. This is not expected, since with such phenomenon, one cannot derive any conclusion from the simulations.

I think, if one does not use -icount option, qemu does not track the real-clock.
Sparsh
 
  


Reply

Tags
determinism, qemu, simulator


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass QEMU a physical card rather than emulation/simulation dman777 Linux - Virtualization and Cloud 2 07-29-2011 04:24 PM
qemu: hardware error: qemu: could not load PowerPC bios 'openbios-ppc' Skaperen Linux - Virtualization and Cloud 8 06-09-2011 08:15 AM
NS2 network simulation problem:Change queue parameters dynamically during simulation raeisy Linux - Networking 1 11-21-2010 12:30 PM
Acoustic simulation program or (sound wave simulation program) tarotint Linux - Software 2 02-24-2010 05:04 AM
imagemagick problem: height-and-width not deterministic when I crop an png file. centguy Linux - Software 2 09-09-2009 06:31 AM


All times are GMT -5. The time now is 08:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration