Recently on the forum, a person asked a question about how to properly divide a dedicated server into virtual ones:

And what struck me was the assurance that no one would ever share such information:
')

Therefore, I really want to tell you how we implemented the solution in our country. All the pitfalls and secrets of this decision. And once again demonstrate that simplicity sometimes makes decisions magical. Since we have not received a single complaint from the clients of this service for all the time, and this says a lot.
First of all, it should be noted that buying a virtual server, you really often do not even suspect what real performance you can get and what hidden limitations there may be. You see only the parameters, but it is completely incomprehensible how they are ensured, whether there is a real opportunity to consume them, or there are effects of bottlenecks that are hidden from the customer, and sometimes even from the hosting provider itself.
Of course, all services of this kind have a certain degree of oversell, which depends on the architecture of the solution and on the provider’s greed / arrogance, as well as on its dullness and level of experience.
OpenVZ or KVM? Selection What problems should our virtual server solve?
Both types of virtualization allow oversell, no matter what anyone says. And the stumbling block of many providers is precisely in the inefficient allocation of processor resources and lack of storage performance, which, in turn, introduces significant delays (latency) in many processes running on the node, and not in the wrong choice of the virtualization system.
KVM provides more isolated containers and the ability to have an individual version of kernel / kernel settings, which most likely will not be offered on simple servers based on OpenVZ 6. It is possible to configure traffic routing using iptables or other services, install the necessary packages without asking the administrator server, remove unnecessary from the system kernel. In addition, because each KVM virtual machine runs its own kernel, KVM does not limit you to choosing only Linux-like operating systems (CentOS, Debian, Ubuntu, Fedora, RedHat, etc.), you can also install other Unix -like OS (BSD, Solaris) and even Windows. KVM does not require a special amount of RAM or other resources and can more effectively isolate the resources provided for containers in the same node as compared to OpenVZ 6.
And although KVM virtualization leads to a slightly larger consumption of RAM resources on the user container side, since RAM for the kernel is taken from the quota allocated to the user, for us this is not critical. Since this matters only when the amount of RAM is small, say 512 MB for a container. That is why we chose KVM, as it provides a lot of advantages in our version, as well as the absence of negative marketing, as most users believe that oversell is always on virtual machines with OpenVZ and impossible on KVM.
But it is not. We are still an oversell, but reasonably, so that everyone at any moment in time can get the resource they have bought.
When I developed the product
“virtual servers with dedicated drives” , I set myself several goals:
- save users from the disadvantages of shared storage and the expensive cost of storing files in case of low load on storage.
You want or you do not want, but IOPS, input-output operations, for each user it is necessary to limit, if this storage is shared (shared). This affects the cloud virtual servers we offer in the Netherlands, USA and Singapore, where IOPS is limited to 1000 and no matter which type is random or sequential. Which is generally very good, much more than the HDD drive, which on average can provide only 70-100 random IOPS and even in RAID from many drives it is difficult to reach 1000. But we received complaints from some customers that they could not quickly transfer data when reading sequentially, because they rest on this performance value. And that our cloud-based VPS work for their case more slowly than shared VPS on a shared HDD from another provider. Yes, of course, as experience shows, there are always more people who buy a service for 5.99 than people who buy servers for $ 100 + complain, but nevertheless I wanted to solve this problem in a new product. And the solution, of course, is to provide only dedicated drives. But not only SSD type, but also HDD type, because some users may face the task of storing a large amount of data in the absence of a large load on the IOPS for storage at minimal cost, which ultimately can not provide a cloud-based VPS product with expensive SSDs. Since there very often there are two negative factors at once - an expensive quota and expensive traffic.
- save users and themselves from ancient processors.
E3-1230 was an awesome processor, at the time. I remember him since the time of 2009, when I started to buy the first servers for clients with these processors. Moreover, in truth, for more than 90% of modern web projects, it is fully and completely lacking. This whole race for the newest version and the newest CPUs is in most cases marketing and makes no sense, since most customers have no need for something more powerful and better. In 2012, as soon as we decided to transfer everyone from Ukraine to the Netherlands, as there were better channels and connectivity, prices and normal laws, well, a lot of people from clients wanted to post content for adults, which accounts for 60% of all Internet traffic. - I got rid of the ownership of old processors and servers in Ukraine. I sold servers for a few hundred dollars each, since in the Netherlands it was cheaper to rent servers than to place their own hardware and put on kolo, of course in the general case. I signed a large contract and after 2 years we had more than 1,000 servers on loan, mostly the same outdated E3-1230, but already a little more than a new generation, since it was the most popular platform and it was optimal in terms of cost. Nevertheless, we occupied thousands of units in the cabinets and consumed a lot of energy. Blade systems, when in 4 units you can place 8 or more E3-1230 blades with two drives for each and 32GB RAM were still expensive. And cost-effective, perhaps, a couple of years ago. But not in 2015. This year, we did take a step towards virtualization and offered subscribers a part of a dedicated E3-1230 server, and later a 2 x E5620 dual-processor platform, further increasing the sales of platforms. But the data center soon offered its own product - cloud - based VPS , which was cheaper in some cases and our sales fell. Nevertheless, it cannot be said that this decision has become magical, rather successful. The purpose of the data center is clear - somehow, it was necessary to dispose of the ancient E3-1230 in order to be able to purchase newer platforms, while receiving some part of the segment of subscribers who are interested in virtual, rather than dedicated servers. The product, in principle, turned out to be quite good, although at the initial stage there were a couple of global problems with duplicated vaults, as a result of which users of this cloud service, despite duplication, lost their data and got daily unavailability. In general, our backups are everything, even in the most reliable clouds, never forget about this, as well as about the emergency recovery plan ... Now the service is stable and is a good intermediate option between hosting and a dedicated server, but not fully able to replace a dedicated server E3-1230. As a result, we turned to the search for a cost-effective platform, which would have much more resources, so that we could get closer to the performance of the E3-1230 and even surpass it. And such a platform was found - Dell R730xd. For more information about all the benefits that we discovered, you can find in my article: How to build the infrastructure of the building. class c using servers Dell R730xd E5-2650 v4 worth 9000 euros for a penny? These servers are perfect for our task. We decided to use platforms on 12 drives, as in the case of a larger number, we risk getting a lot of bottlenecks, starting from the controller's capabilities and ending with the fact that some of the users simply do not have enough CPU, because with a larger number of users the interrupts in the cores will be distributed less efficiently than when there are fewer users.
- ensure the performance of the virtual server at the level of entry-level dedicated, and even a number of additional benefits
Dell R730xd allowed us that. The latest generation E5-2650 v4 processor supports many instructions that even modern entry-level processors do not support. All this makes processing operations faster at the same frequencies. At times and even dozens of times. However, synthetic tests, which are sometimes carried out by users testing maximum loads, cannot always fully demonstrate this. Therefore, sometimes, making a comparison with the entry-level server, the user does not see the advantages that he could see if he has a real workload, and not testing weakly effective synthetics. Also, just as it does not feel when testing that this platform, unlike many competitive solutions, is as balanced as possible. What can I say, only due to the fact that the RAID controller supports the DAS Cache technology, we get the same level of utilization of the CPU, but with a 2.5 times higher IOPS value as on the similar HP server, but with a controller with caching Cache Cade. Only this small difference increases productivity by 2.5 times, and on synthetics - we will not see this most likely.
- provide ease of management.
For cloud VPS, we, unfortunately, could not provide a convenient panel. As a result, we use a samopisny solution, limited in capabilities, since this is a product of the data center and the interaction goes through the API and we do not always have the opportunity to provide more functionality. For VPS (KVM) with dedicated drives, we decided that VM Manager would be a more optimal panel, besides it would not significantly increase the cost of the product, since the license costs only 3.2 euro for us, since we are a platinum partner of ISP System , conditions of the partnership program can be found here . Since there can be a maximum of 12 drives on a node, and 24 physical cores (2 processors with 12 cores each, 24 taking into account hyper trading in each processor, a total of 48 threads / virtual cores on the server), it is optimal to divide the resources into 3-12 virtual contrays the maximum that adds to the cost of a virtual server from the cost of seeing VM Manager from 1.07 euro for the most expensive servers and up to 0.27 euro for the cheapest. The cost of maintaining the node is much greater. Since we estimate them at about $ 10 / month for monitoring each of the nodes, and about $ 1-2 for us, the cost of responding to the ticket for the client is about, if we divide the charge. fee of those. department on the number of answered tickets per month. In order to reduce operating costs, an automation system was developed that made it possible to perform many non-trivial installations for VM Manager in automatic mode. One of the problems was that the product did not support the logic of dedicated drives and various RAID levels for them. Therefore it was necessary to standardize nodes for users as much as possible. The result was a convenient product with a maximum of opportunities for its management. It provides access to the automatic installer with the ability to choose from a variety of operating systems, both with the ISP Manager Lite 5 panel (provided at no additional charge) or without it, the ability to install Windows Server 2008/2012:

Also available is the ability to mount your own ISO images, both from a local computer and from a remote server, specifying a link to the image:

The only thing better to contact those. Department, so that they download the image locally, so the installation will be faster and will not depend on the quality of your Internet connection. Reboot, the ability to monitor statistics and connect to VNC (KVM analog) is available from the control panel of the virtual server:



- to provide a low price for traffic in comparison even with a dedicated server, as the user of a developing project, of course, needs it.
When nodes are filled with dozens and even hundreds of users, the price of traffic cannot be extremely low, even taking into account oversell, when traffic is sold 4 times or even cheaper than it actually costs. The oversell factor can be increased, provided that users are simply not able to generate this traffic, since other parameters simply won't allow them to do this. But we are not interested. We do not want to put into service a service with which users will be unhappy, our task is to make our customers happy and therefore we have chosen a different path. We place our dedicated servers Dell R730xd 2 x Intel Dodeca-Core Xeon E5-2650 v4 128GB DDR4 6 x 480GB SSD 1Gbps 100 TV in common cabinets of the data center, and do not pay for our own cabinets and ah pi addresses and tell us what's cool while putting a huge price tag. Not cool! Since such "cool" providers can not provide for this reason, servers for rent at a price of $ 249 / month , and we can! And here it’s not so much the cost of accommodation as the cost of traffic. In the private rack, it is at least $ 500 per Gbit / s with the best hands per month, and if it is a mixture of high-quality uplinks, then even taking into account oversell, you can not make the rental price $ 249 with a traffic limit of 30% of the total capacity of the channel. In reality, the situation is even worse, since the audience of websites is uneven during the day and one user of such a dedicated server can consume more than 500 Mbps in peaks, while not using 100 at night. What can we say if this user uses nodes for virtualization like us. That is why we have distributed our nodes among the dedicated servers of the data center, which do not consume their full capacity, and thus, at the expense of the users of the entry-level servers of the data center, we get cheaper traffic for our nodes. Just count, the above dedicated server for rent with a traffic limit of 100 TB costs $ 249 / month. And for VPS on the same node the traffic is cheaper! Since the equipment is the same in the case of VPS and in the case of the server, the difference in cost should be due only to traffic. For VPS, we consider traffic at a price of $ 15/10 TB, and from 10 to 40 TB we include in the cost of the service, for example, the cost of the most expensive VPS is $ 99 and includes 50% + resources from a dedicated server and, of course, 40 TB of traffic. Thus, it turns out that TB traffic for VPS users costs $ 1.5, while for a dedicated server $ 2.5 (of course, at a rate of 100 TB, and not a tariff without regard to). Thus, we made the traffic for the VPS cheaper than for the dedicated entry-level servers, because in addition,
one more degree of oversell is provided - not every user consumes his limit of 10 or 40 TB, which is already included in the cost of the service by default.
- to provide an inexpensive CPU with a fair use policy or honest and expensive?
And not one and not the other. We decided not to bother with the policies of fair use of the processor or the allocation of a guaranteed kernel in understanding the correspondence of the number of cores on the server to the cores allocated to users. Practice has shown that oversell virtual cores are valid and even useful - reduces the cost of services for the end user, if this ratio does not exceed 1.5-2. But some hosting providers manage to sell resources 200-300%, or even 600-1000%, which often causes problems and delays. By applying platforms on only 12 drives, our users can be sure that the number of users is severely limited and we do not sell resources with similar high coefficients.
Implementation
As already mentioned above, the Dell R730xd platform allowed to bring ideas to life, as it has many advantages described in the article:
How to build an infrastructure of a building. class c using servers Dell R730xd E5-2650 v4 worth 9000 euros for a penny? . The uniqueness of our proposal is that we take standard dedicated servers, that is, bare metal, and even for different types of virtual servers we use the same platform, that is, we ensure maximum homogeneity of the media. Why this is necessary - we will write a little later. But in general, the idea is to get rid of the need to create hybrid virtual servers with dedicated drives, when HDD and SSD are allocated to the user, as most users do not need it, and those that need it are not needed either. In fact, it is much more convenient to rent the appropriate type of virtual server for the corresponding task. If it is heavy MySQL - SSD, if it is storage of files that do not require productive (more than 70 random IOPS) storage - HDD, if it is storage of files, some of which require efficient storage - we rent both types of virtual servers and SSD virtual machines for cache. If we need increased fault tolerance, we rent the same virtual machines on different nodes and build the simplest DNS cluster.
Since for rent
we offer dedicated servers of the following configurations in one price (from $ 249 / month) in the Netherlands and the USA :
Dell R730xd 2 x Intel Dodeca-Core Xeon E5-2650v4 / 128GB / 6x480GB SSD / 1Gbps 100TB
Dell R730xd 2 x Intel Dodeca-Core Xeon E5-2650v4 / 128GB / 12x240GB SSD / 1Gbps 100TB
Dell R730xd 2 x Intel Dodeca-Core Xeon E5-2650v4 / 128GB / 12x4TB HDD / 1Gbps 100TB
It was decided to create the following types of VPS (KVM):
12 on the node: VPS (KVM) - E5-2650v4 (6 Cores) / 10GB DDR4 / 240GB SSD / 1Gbps 10TB - $ 29
6 on the node: VPS (KVM) - E5-2650v4 (12 Cores) / 20GB DDR4 / 2x240GB RAID1 SSD / 1Gbps 20TB - $ 49
3 on the node: VPS (KVM) - E5-2650v4 (24 Cores) / 40GB DDR4 / 4x240GB RAID10 SSD / 1Gbps 40TB - $ 99
6 on the node: VPS (KVM) - E5-2650v4 (12 Cores) / 20GB DDR4 / 480GB SSD / 1Gbps 20TB - $ 49
3 on the node: VPS (KVM) - E5-2650v4 (24 Cores) / 40GB DDR4 / 2x480GB RAID1 SSD / 1Gbps 40TB - $ 99
12 on the node: VPS (KVM) - E5-2650v4 (6 Cores) / 10GB DDR4 / 4TB SATA / 1Gbps 10TB - $ 29
6 on the node: VPS (KVM) - E5-2650v4 (12 Cores) / 20GB DDR4 / 2x4TB RAID1 SATA / 1Gbps 20TB - $ 49
3 on the node: VPS (KVM) - E5-2650v4 (24 Cores) / 40GB DDR4 / 4x4TB RAID10 SATA / 1Gbps 40TB - $ 99
Virtualization put on all drives in RAID1 and allocate 8 GB of RAM for it, which is more than enough. As you can see, the processor overbooking is 1.5 times if the application supports multithreading and 3 times in cases, if not, which are very rare cases.
Also, there is an additional overbooking for traffic, the total traffic per node is 100 TB, and we sell only 1.2 times more than it actually is.
In general, we guarantee both resources to users, since at the same time, especially on nodes where there are 12 users, it is unlikely that anyone will even consume 50% of CPU resources, since there are very few such projects. As a result, on average, our nodes are 25-30% loaded on the processor and each user can always get the promise, and if one client orders several virtual lovers, we try to distribute them between the nodes, in case the client wants to consume all his resources by 100% . The traffic situation is even more joyful. Not every dedicated server manages to consume 5 TB of traffic per month, this requires not a weak attendance of the project. Let's calculate how much should be about visitors per month if the resource does not contain video streaming and the average page size is 768 KB. 5 TB = 5000000 / 0.768 = 6 510 416.67 million views per month! Or 0.2 million per day, or 2.5 views per second! Is it a lot or a little? Since the ratio of hits (views) to hosts (unique visitors) rarely exceeds 10 on average, only when it is not social. network in which people spend days. Thus, we obtain attendance of about 20,000 per day or 600,000 per month. What is observed is not every user who rents a similar VPS with such a large traffic limit as 10 TB minimum. I remember the time, only 9 years ago, when the traffic limits of the dedicated servers were less, about 5 TB. In our case, with only 2% of nodes, the 100TB mark is exceeded by traffic, for which we additionally pay the data center when there is no possibility to distribute users more effectively between nodes or we are just too lazy to disturb users for the sake of cheap savings.
As for the processor, we and our clients, and these are thousands of people who use a relatively new product for a year, have never faced the fact that someone lacked a processor for real tasks. Although there were once problems, once the miner scored the resources of the entire node, since it is difficult to limit mining interruptions, it is possible to lower the priority. However - this was an isolated case. The other client, from France, successfully rented over a dozen VPS for mining, and his mining did not cause damage to the nodes and other users, possibly due to the fact that he limited his own consumption. But he was extremely pleased and continues to buy new servers today. Thus, we came to the conclusion that we will not forbid miners to use our services, but we will consider such projects individually. After all, our goal is to minimize the cost for our users. And the more people use our product - the easier it is for us to maintain an incredibly low price range, despite a more than 18% increase in the euro rate, compared with the time when the product was just put into operation. As a last resort, we can always move such a miner to a free node and ensure stable and efficient work for all.
Content marketing
This is complete nonsense with rare exceptions. The best marketing is satisfied customers. Over the last year of work, a lot of praise has been written to our product
in our advertising topic on the search engine forum , and from people with a reputation. We never ask to write reviews, because these reviews are genuine, sincere, and therefore even more valuable, and our customers are very pleased with the quality they received and we do not work in vain.
I want to comment on
some of them :

No, the nodes are connected with a 1 Gbps channel, even our competitor decided to comment on this and here I could partially agree with him:
The server is enabled 1Gbit \ ohm, hosting_manager itself wrote about this somewhere in its bulk posts. Not even 2x1Gbit \ s because, as it is not necessary and expensive, according to hosting_manager. Therefore, when you load the channel on 1 Gbit / s with your VPSK - the neighbors start to miss, if you have them, of course, are present. What I really doubt very much.
The truth is that the client was located on a fully and 100% customer-filled node and still lives beautifully there. The channel there is 1 Gbps at all and is no longer needed. As in cases when someone needs a 1 Gb / s channel, another client will receive less. That is, if some other person needs to pump a lot - he will pump, just the others will have the speed reduced by half for maximum load, minus the usual consumption by neighbors. On our nodes it is easy to determine the minimum guaranteed speed, if everyone starts loading the channel by 100%, for three-user nodes it is 330 Mbps each in accordance with the TCP / IP protocol, if we of course use equal priority, for six-user nodes Is about 150 Mbit / s, and for nodes with 12 users it is 75 Mbit / s. But the truth is that no one loads its channel 100% at the same time for the reason that even 5 TB of traffic is problematic, and each user has up to 900 Mbps at the peak, because the test is very truthful, real. Recently, another client has proved this to us by testing the bandwidth of the channel and other characteristics; the results can be found
here . The test was conducted last week.
But what if someone needs 900 Mbit / s constantly for some task? Of course - in this case, it is better to purchase a dedicated server, especially since the
Dell R730xd 2 x Intel Dodeca-Core Xeon E5-2650 v4 128GB DDR4 6 x 480GB SSD 1Gbps Unmetered in the Netherlands and the United States, we offer at a price of $ 369 / month and here there is already traffic will be cheaper, because gigabit allows you to pump about 300 TB of traffic in each direction (totally 600 TB), which is much cheaper than paying for traffic using VPS at the rate of $ 15 per 10 TB (300 TB = $ 450, 600 TB = $ 900). And therefore we will gladly move such a single VPS user, who constantly needs a dedicated gigabit, if he does not want the server, on his personal node, since this is 1.5-3 times more profitable for us. So yes, we can even guarantee a 1 Gbps channel on a VPS. If such a client exists of course and decides to pay for this guaranteed traffic, despite the fact that there is a more cost-effective solution.
Another comment .

Yes, indeed, the new product came out wonderful. And the ability to install Windows Trial for 180 days solves a lot, especially for people who do not have the ability to pay huge bills for licenses. The data center, as a SPLA partner, cannot do this, but we can. Because we are no longer Microsoft’s SPLA partner as a result of their inadequate policies. Because customers of our VPS (KVM) have significant savings on licenses. In this case, everything remains within the law. We simply do not sell licenses for this type of services, if the client wants to - he will be able to buy a license online, or reinstall the VPS and use Trial for another half a year. After all, Microsoft itself allows it, having a short-lived licensing and pricing system. Would do everything normally and at reasonable prices - everyone would buy, without question, as well as licenses of the ISP System, because the prices correspond to the quality of the product.
And another comment
There can be nothing more valuable than a test on a real project, of course, that synthetic tests can show some kind of result, but in some cases it is not very good. Yes, our product loses some parameters of the test for 1 core for the same E3-1230, since this is a synthetic test. Nevertheless, due to the support of many different processor instructions, which are completely absent in the E3-1230 even of the last generation, not to mention the earlier ones, in reality our decision is one step ahead. , , . — 1, , . VPS (KVM) , , , 3-1230, . — , . , , . . , .
:

iops=73457 iops=156229 , , . , over-provisioning latency SSD , . SSD 50 , :
(SSD) RAID- .
, , Samsung SM863.
, , Intel
. , . 2015 . , TBW, , , «» TBW, .
Habrahabr :

, , . . , , 75% , ? , , , , , . , , , FUP (fair use policy) . , , 100%. , . , , , , , 90% , , , , , .
disadvantages
, , , . — .
, , , VPS, VPS, . , VPS (KVM) c 240 GB SSD, VPS 1 GB, 240 , , , . — , , , , . 240 , 35 , . . — , , 1 / . , , 10 / , , private networking, , . -. , , $14 , 1000+ — $14 000+ / . ? , , , - …
, - , , . :
CPU weight 3000
I/O usage weight 1000
, — . , , , , 6 vCPU, .
— . , 1,05, $1,24 , 18% . , .
$10 . % % , . , .
, . , 100% . . , , — , , 15%. , , — , .
, ,
habrahabr 30% -
HABR30% . - 1000 , , , :
https://www.ua-hosting.company/vpsnl —
https://ua-hosting.company/vpsus —
VPS (KVM) — E5-2650v4 (6 Cores) / 10GB DDR4 / 240GB SSD / 1Gbps 10TB —
$29-30% = $20,3VPS (KVM) — E5-2650v4 (12 Cores) / 20GB DDR4 / 2240GB RAID1 SSD / 1Gbps 20TB —
$49-30% = $34,3VPS (KVM) — E5-2650v4 (24 Cores) / 40GB DDR4 / 4x240GB RAID10 SSD / 1Gbps 40TB —
$99-30% = $69,3VPS (KVM) — E5-2650v4 (12 Cores) / 20GB DDR4 / 480GB SSD / 1Gbps 20TB —
$49-30% = $34,3VPS (KVM) — E5-2650v4 (24 Cores) / 40GB DDR4 / 2x480GB RAID1 SSD / 1Gbps 40TB —
$99-30% = $69,3VPS (KVM) — E5-2650v4 (6 Cores) / 10GB DDR4 / 4TB SATA / 1Gbps 10TB —
$29-30% = $20,3VPS (KVM) — E5-2650v4 (12 Cores) / 20GB DDR4 / 2x4TB RAID1 SATA / 1Gbps 20TB —
$49-30% = $34,3VPS (KVM) — E5-2650v4 (24 Cores) / 40GB DDR4 / 4x4TB RAID10 SATA / 1Gbps 40TB —
$99-30% = $69,3, $7 /
, . , , , — , . , , , , . 36 , .
, VPS , Dell R730xd , :
. class c using servers Dell R730xd E5-2650 v4 worth 9000 euros for a penny? Dell R730xd 2 times cheaper? Only we have
2 x Intel Dodeca-Core Xeon E5-2650v4 128GB DDR4 6x480GB SSD 1Gbps 100 TV from $ 249 in the Netherlands and the USA!