Tuesday, March 10, 2009

Xen: performance of full virtualization vs. paravirtualization

I wanted to check what is the difference in performance between virtualization and paravirtualization using Xen. Before going any further some basic info about paravirtualization and full virtualization is given.

Under paravirtualization the kernel of the guest operating system is modified specifically to run on the hypervisor [from here], where hypervisor is a program that runs directly on the hardware of the host system in ring 0. The task of the hypervisor is to handle resource and memory allocation for the virtual machines in addition to providing interfaces for higher level administration and monitoring tools [from here]. Full virtualization provides support for unmodified guest operating systems. The term unmodified refers to operating system kernels which have not been altered to run on a hypervisor and therefore still execute privileged operations as though running in ring 0 of the CPU. In this scenario, the hypervisor provides CPU emulation to handle and modify privileged and protected CPU operations made by unmodified guest operating system kernels [from here].

To compare the performance of paravirtualized system with full virtualized syststem I created two virtual machines (two domU's). The first one was full virtualization with CentOS 5.2 x86_64, while the second one was paravirtualization with the same CentOS 5.2 x86_64. CentOS's were installed with identical sets of packages and configurations. The only difference between the two, was that one was installed using full virtualization, while the second was installed using paravirtualization. Both were installed with four virtual CPU's and 1GB of RAM. The host (dom0) was CentOS 5.2 x86_64 with 24 CPUs (4 physical Xeon CPUs, each with 6 cores) and 24GB of RAM. It must be noted the my CPUs support hardware virtualization (Intel VT-x). Hardware virtualization leverages virtualization features built into the latest generations of CPUs from both Intel and AMD [from here]. Therefore, the following title of this post could be better: Xen: performance of hardware virtualization vs. paravirtualization. However, I basically refer to the fact that in paravirtualization the kernel of the guest (i.e. domU) is modified, while in full and hardware virtualizations the kernel of the guest is not modified.
To compare the performance the following benchmarks were used: nbench, bench and primes 0.9. nbench and bench are single-threaded benchmarks, while primes is multi-threaded benchmark. Primes benchmark was executed with four CPUs and option #15 (i.e. find all prime number less than 256,000,000). The tests on one virtual machine were performed while the other was not running.

Some results are presented below. Full results are here (PV) and here (FV). Better results between the two virtualization method were marked using bold font. For complicity, results for dom0 are also given. Dom0 was the same CentOS 5.2 x86_64 as was used in virtual machines. However, there were differences in configuration, installed packages and services. In another words, dom0 was little more loaded than any domU. During the tests on dom0, virtual machines were shutdown. The full results for dom0 are here.

nbench results

Index (higher is better) Full virtualization Paravirtualizationdom0
MEMORY INDEX 18.892 18.99121.046
INTEGER INDEX 16.921 17.06217.969
FLOATING-POINT INDEX 28.499 28.78129.917

Update 17/03/09: I tested fully virtualized ubuntu-server 8.10 using nbench and got: 19.037,18.017 and 28.756.

Primes results

Time [s] (lower is better) Full virtualization Paravirtualizationdom0*
Time 116.423 112.432104.67
* - four CPUs were used.

Update 17/03/09: I tested fully virtualized ubuntu-server 8.10 using primes, and got 113.297 s.

bench results

Index (higher is better) Full virtualization Paravirtualizationdom0
Arithmetic Test (type = double) 409.6 411.6461.3
Dhrystone 2 without register variables484.4 489.8539.2
Process Creation Test [lps] 614.0 3176.72855.6
Shell scripts (4 concurrent) [lpm] 190.6 1250.01261.3


Paravirtualization is marginally faster than full virtualization in my case. Therefore, from the results obtained it does not appear that paravirtualization exhibits much greater performance over full virtualization. One reason for this may be the fact that my CPU's support hardware virtualization. However, my tests were not full. Things such as network bandwich, disk operations etc. were not tested. More tests is required.


  1. Anonymous7:31 PM

    Finally, some usefull comparison, though some graphs would help. Did you use KVM?

  2. Anonymous9:16 PM

    Very nice and helpful, thanks for the info :)

  3. very helpful! thanks!

  4. Thanks for this awesome information !

  5. Thanks ! very informative !

  6. Anonymous11:45 AM

    hello I want to see how to acces to the USB with paravirtualization . and also in full virtualization : the host is open suse the guest is windows7 for full virtualization . and open suse in paravirtualization.

  7. Anonymous6:27 AM

    certainly like your web-site however you need to check the spelling
    on several of your posts. Many of them are rife with spelling issues and I find
    it very bothersome to inform the reality however I'll definitely come back again.
    Feel free to visit my web page ... Easy Cash On Demand

  8. Anonymous6:44 AM

    Hi there, I wish for to subscribe for this blog to
    take most up-to-date updates, therefore where can i do
    it please help.
    My blog post ; Eprofit Academy Reviews

  9. Anonymous7:25 AM

    I loved as much as you will receive carried out
    right here. The sketch is attractive, your authored subject matter stylish.

    nonetheless, you command get got an shakiness over that you wish be delivering the
    following. unwell unquestionably come further formerly again as exactly the
    same nearly a lot often inside case you shield this hike.
    My blog puregreencoffeefacts.com

  10. Anonymous7:41 AM

    Thanks for some other informative site. The place
    else could I am getting that kind of information written in such a perfect means?
    I have a undertaking that I'm just now operating on, and I've been at the glance out for such information.
    Also visit my site :: Buy Bellavani

  11. Anonymous12:38 AM

    It's an awesome post designed for all the internet people; they will get advantage from it I am sure.
    Here is my web-site - Willie66G: garcinia cambogia fruit extract

  12. Anonymous1:33 AM

    We absolutely love your blog and find most of your post's to be exactly I'm looking for.
    Do you offer guest writers to write content for you personally?
    I wouldn't mind creating a post or elaborating on many of the subjects you write related to here. Again, awesome website!
    My website ... White Kidney Bean Extract

  13. Anonymous4:10 AM

    Way cool! Some extremely valid points! I appreciate you penning this article plus the rest of the site is very good.
    Feel free to surf my blog :: please click the up coming website page

  14. Anonymous10:53 AM

    It's awesome designed for me to have a site, which is helpful in support of my knowledge. thanks admin
    Also see my webpage :: www.telfs.com

  15. Anonymous12:23 PM

    Way cool! Some extremely valid points! I appreciate you writing this article and the rest of the site is really good.
    Visit my blog post :: AfricanMango Active

  16. Anonymous1:18 PM

    I must thank you for the efforts you've put in penning this website. I'm hoping to view the same high-grade content by you in
    the future as well. In fact, your creative writing abilities has motivated me to get my own, personal site
    now ;)
    My page :: Pacific Region Education Consultancy

  17. Anonymous3:57 PM

    Very quickly this website will be famous among all blog viewers, due to it's pleasant posts
    My site - african Mango Active Review

  18. Anonymous9:32 AM

    I tend not to drop many responses, but i did some
    searching and wound up here "Xen: performance of full virtualization vs. paravirtualization".
    And I actually do have 2 questions for you if
    it's allright. Could it be just me or does it appear like some of these remarks look like left by brain dead people? :-P And, if you are writing on other online sites, I would like to follow anything fresh you have to post. Would you list of the complete urls of your social pages like your linkedin profile, Facebook page or twitter feed?
    My site: Read �

  19. Anonymous4:29 PM

    Hey there! I know this is kinda off topic however ,
    I'd figured I'd ask. Would you be interested in trading links or maybe guest authoring a blog post or vice-versa?
    My website goes over a lot of the same subjects as yours
    and I feel we could greatly benefit from each other. If you happen to be interested feel free to
    send me an e-mail. I look forward to hearing from you! Fantastic blog by the way!

    my weblog - http://www.lepremiersoir.fr/MiguelLre

  20. Anonymous8:11 AM

    You're so interesting! I don't believe I have read through anything like this
    before. So nice to discover someone with some unique thoughts on
    this issue. Seriously.. thanks for starting this up.
    This site is something that is needed on the internet, someone
    with a little originality!

    Also visit my site; Home Cash Success Kit Reviews

  21. Anonymous9:54 PM

    I think this is among the most vital info for me.

    And i'm glad reading your article. But should remark on few general things, The web site style is great, the articles is really excellent : D. Good job, cheers

    Check out my web-site ... http://muellnerblacktop.net/commercial-paving

  22. This comment has been removed by the author.

  23. Hii..

    Good to see sharing of your experiences.Keep posting as it is helping a lot.I had known a new thing today. :) thank you dear.

    Virtualization services

  24. Anonymous7:59 PM

    These are in fact fantastic ideas in regarding blogging.
    You have touched some pleasant factors here. Any way keep up wrinting.

    Here is my blog - toenail fungus treatment

  25. Anonymous4:54 AM

    I enjoy looking through an article that will make people think.
    Also, many thanks for allowing for me to comment!

    Feel free to surf to my webpage ... 1

  26. Anonymous12:37 PM

    Your way of describing everything in this piece of writing is actually good,
    every one be capable of without difficulty know it, Thanks a lot.

    my blog :: Trimextrin Diet

  27. Anonymous7:43 AM

    I am really loving the theme/design of your web
    site. Do you ever run into any browser compatibility problems?
    A couple of my blog visitors have complained about my website not working correctly in Explorer but looks great in Opera.

    Do you have any advice to help fix this issue?

    Review my webpage :: Pure GCE Extract

  28. Anonymous8:04 AM

    Excellent way of explaining, and nice piece of writing to take information about my presentation subject matter,
    which i am going to convey in institution of higher education.

    My weblog http://portal.postloop.com/

  29. Anonymous8:01 PM

    Thanks designed for sharing such a pleasant thought, paragraph is good, thats why i have read
    it fully

    My website: http://trimextrindiet.com

  30. Anonymous7:53 PM

    That is really interesting, You are a very professional blogger.
    I've joined your feed and look ahead to searching for more of your great post. Also, I've
    shared your site in my social networks

    Look into my blog post: Pure GCE

  31. Anonymous5:54 AM

    Thanks for a marvelous posting! I seriously enjoyed reading it, you are a great author.
    I will make certain to bookmark your blog and will often come back
    down the road. I want to encourage you to ultimately continue your great writing, have a nice morning!

    My blog; White Kidney Bean Review

  32. Anonymous11:14 AM

    I visited various blogs but the audio quality for audio songs current at this website
    is actually marvelous.

    my web site ... Slim Lipo

  33. Anonymous4:39 PM

    Hi! Do you know if they make any plugins to help with Search Engine
    Optimization? I'm trying to get my blog to rank for some targeted keywords but I'm not
    seeing very good results. If you know of any please share.


    Take a look at my web blog - Sign in

  34. Anonymous3:33 AM

    We stumbled over here from a different page and thought I may as well check things out.
    I like what I see so now i'm following you. Look forward to looking over your web page repeatedly.

    Also visit my web-site slimlipoplusdiet.com

  35. Anonymous10:23 PM

    Whats up this is kinda of off topic but I was
    wondering if blogs use WYSIWYG editors or if you have to manually code with
    HTML. I'm starting a blog soon but have no coding knowledge so I wanted to get advice from someone with experience. Any help would be enormously appreciated!

    My web blog; slimlipoplusdiet. com

  36. Anonymous9:13 AM

    I know this if off topic but I'm looking into starting my own weblog and was curious what all is needed to get set up? I'm assuming having a blog like yours would cost a pretty penny?
    I'm not very internet savvy so I'm not 100% sure. Any tips or advice would
    be greatly appreciated. Appreciate it

    my web-site; http://slimlipoplusdiet.com