How to select Vps:xen and OPENVZ technical performance test

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Ready to buy a VPS, compared to a number of VPS providers, foreign, domestic, pay attention to whether it is openvz good or xen good problem, then consulted some information, get some experience, share.

The following translation from Hostingfu.com,observer, I added a note.

Technical specification analysis of OPENVZ and Xen

The difference between 1.Xen and OpenVZ

Xen and OpenVZ are also virtualization host technologies, the difference being that Xen is a semi virtualization technology that is not a real virtual machine, but rather the equivalent of running a kernel instance, free to load kernel modules, virtual memory and Io, stable and predictable. OpenVZ is an operating system-level virtualization technology that is a layer of application on the underlying operating system, meaning easy to understand and low weight overhead, which generally means better performance.

There's a problem here and you can see that actually OPENVZ is better than Xen in theory because it eliminates a lot of public overhead. Why do we all think OpenVZ is too crushing? I think it is because OPENVZ configuration is more flexible, to the black-hearted OpenVZ service providers to change the opportunity to lower restrictions.

For example, Mediatemple, known as 512M Memory DV program, kmemsize only 12M, do not know people see 512M feel very ha ah, but when used in general this 512M can be divided into your hand half is good. This is a long way to go so that Xen can make better use of the illusion of machine performance.

2.OPENVZ Kernel model

First when the OPENVZ host says "256MB guarantee", it actually means about 232MB of "privvmpages", 14M of "kmemsize" and other miscellaneous resources. When the application calls malloc () the allocated memory will be added to "privvmpages".

When "privvmpages" exceeds the limit, malloc () fails and returns a null. When the host server is running out of memory, then the process in the virtual environment over "oomguarpages" will be terminated.

OpenVZ's memory management approach has both problems and advantages. One of the biggest problems is that memory-capacity applications use memory that is different from the memory the application actually allocates, and that the differences between applications can be significant. In Java, for example, it typically allocates a large chunk of memory, but it may use only a small fraction of the allocated memory. If Privvmpages is restricted, Java will stop running immediately. Tuning parameters can solve some of the problems, but it's handled absolutely without Xen. In fact, almost all applications that use memory allocations are affected by the OPENVZ problem.

/proc/meminfo itself has a problem. Although OpenVZ has been virtualized for memory, the "free" command still returns the host's memory. This makes small memory OpenVZ VPS Unable to run programs such as Java or GCC compilers.

The advantage of OpenVZ's memory model is that it's easy to understand: you're almost privvmpages limited. Unlike a dedicated server or Xen server, your disk cache and page caching do not count to your total memory usage. As a result, on a OPENVZ host that does not sell over, it may actually perform better than the same-specification Xen VPS Because of its large, redundant public resources.

3.Xen memory model

The Xen system model is easier to interpret. 256MB's Xen VPS is just like a 256MB dedicated server-the memory segment is reserved for VPS-only, no other VPS can use this part of memory, which is like a real dedicated server.

In addition, when memory is low, the VPS uses swap. Generally each VPS with twice times the size of the swap partition, when your application requires more memory, infrequently used pages from memory was swapped out to the swap partition, thereby freeing up more rooms. Therefore, the 256MB Xen VPS system actually has 768MB memory (256MB memory + 512MB swap space), please believe me, swap space is very useful, especially when dealing with unexpected peak demand.

So, Xen is always far superior to OPENVZ? Otherwise, your 256MB VPS theory can be used up to 768MB memory, while in fact the kernel, cache, buffer, they all occupy memory. This part of the system overhead is also considerable. In addition, swap can severely degrade performance.

4. Stability and predictability

Xen and OpenVZ behave differently when memory runs out. Xen swaps the infrequently used memory pages, which greatly reduces performance, and when swap is exhausted, the Xen system responds more and more slowly, like a real server.

And OpenVZ once ran out of memory, it will suddenly die: can not open a new program, only waiting for system resources available. What's more, the good programs that are supposed to run can also grow over the limit and suddenly die. This is like driving to 70 yards, and then suddenly hit the wall, the general will die miserably.

There is no doubt that I am inclined to Xen technology, predictable and stable.

5. Conclusion

If Xen is as expensive as OPENVZ, I'm sure that Xen, because it's predictable, even if OpenVZ hits 80 percent, I'm still in pursuit of stability.

To sum up, draw a few conclusions:

1, Xen than OpenVZ host more favorable to buyers, such as the allocation of 512M memory, this part of the memory from the server specifically zoned to you, others will be unable to use, and OpenVZ is shared memory, such as the allocation of 512M memory is the largest you can use 512M memory, For example, you occupy 200M of memory, then only from the object memory distribution 200M to you, so the seller is very easy to oversold on the server!

2, OpenVZ more efficient, Xen is the hardware at the bottom of the virtual, closer to the real server, and OPENVZ is operating system virtual, virtual services themselves occupy less memory, the same program execution efficiency is higher!

3, if the purchase of OpenVZ should see whether the seller will be oversold, should choose a good reputation and clearly stated that it will not be oversold

4, if purchase Xen host, should also pay attention to the swap size

5, test VPS host performance using Unixbench (many people do not know), foreign very popular this thing!

This is a description of some of its parameters

the following references:


Register performance for Dhry2reg memory

Whetstone-double double-precision floating-point performance

EXECL Execl Call Performance

Fstime File System Performance

Fsbuffer File System Performance

Fsdisk File System Performance

Performance of pipe piping (pipe)

Performance of CONTEXT1 pipeline context switching

Spawn Create Process performance

Shell Shell concurrency Performance

Syscall System Call Performance

6, VPS Uses: Server, SoftSwitch, agent and reverse agent, off-line BT download and so on

7. In general use conditions, the performance of the two should be small.

(English Source: Http://hostingfu.com/article/xen-or-openvz translation: TUSCANY.HK)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.