Building a development environment with Proxmox

Server construction, Admin Blog

My name is Nishimura from the development team. We have been using an aws (Amazon Web Services) instance for developing learningBOX, but we are going to switch to developing on our own server because there are some inconveniences.

Content

  • 1. an inconvenient truth about aws
  • 2. commercial PC's I've considered.
  • I put it together.
  • 4. install ProxmoxVE
  • 5. steps to speed up the drive on Proxmox
  • 6. moving instances from an existing proxmox environment
  • So, did you go faster?
  • 8. future policy

An Inconvenient Truth About Aws

It's a good thing that aws is a good development environment.

  • Not very fast, actually.
    I was mainly using a T3 instance for development, and honestly, T3 instances aren't fast enough, are they? It has only the performance of the 2GHz range in the latest CPU conversion. When I want to use two or more cores, it becomes the cost of several times more.
  • Bigger instances are more expensive.
    In fact, it also overlaps with not being very fast, but using an instance with large memory and a fast CPU can cost you tens of thousands of dollars a month.
  • I don't have just the right instance.
    If you need 2.1GB of memory for development, you need an instance with 4GB of memory. Isn't this a waste of time? You might be able to get around it a little bit with virtual memory or something like that, but the moment you can't fit it into real memory, the processing power drops by an order of magnitude. I want to use just the right size instance.
  •  

    I looked into a commercial computer, but...

    I was going to buy a commercial PC and virtualize it for use, but I didn't have just the right one.

  • I don't need Windows.
    I don't want it. You can't remove it, or if you do, it's not nearly as cheap.
  • I don't need a GPU.
    A PC with a fast CPU usually has a high performance GPU. I don't need one. (Maybe it's necessary if you have desktop virtualization in place, but it's untested.)
  • I don't need a mouse or a keyboard.
    I don't want it.
  •  

    I put it together.

    If you don't have just the right one, you can team it up! So, I built a PC for the first time in a year.
    The parts I used are as follows. All parts are shown except for the case.
    For some reason, the case of the table tennis racket is shown in the picture, but that's not relevant.

     

    Description of the main parts

  • motherboard
    I don't have any particular preference.
  • CPU Core i9 10900
    I chose it for its single thread performance. When it is single thread, when it is single thread, I think that it is stable at 5GHz or more when I actually used it. 10900K was also considered, but I thought that 0.1GHz was not worthy with the price difference of 20,000 yen, and I thought that it was bad, and settled on 10900.
  • DRAM
    I've installed 32GB of the so-so fast one. I'll add more if it's not enough.
  • SSD
    I installed 1TB of the fastest one there (the one that goes 3GB/s).
  • power supply
    God told me to buy a good power supply, and I chose a reasonably good one, because it will be operating 24 hours a day, so power is important.
  • GPU
    For now, it's unloaded.
  • PC assembly

    PC assembly

     

    Install ProxmoxVE

    Using the whole PC may be the fastest, but because it cannot utilize equipment effectively, I built a virtual environment with ProxmoxVE. I'm running Amazon Linux 2 on the virtual environment, but I'll introduce the procedure to run Amazon Linux 2 in another article.

    However, there was a bad block in the USB memory stick made for installation, and I wasted my time. I think that I should make a habit of checking for bad blocks when making the installation media.

     

    Steps to speed up your drive on Proxmox

    The good ones are the ones you shouldn't imitate, but you can improve disk IO in a virtual environment by enabling disk caching as much as possible. It will probably be faster than reading and writing directly without the virtual environment. However, if the power goes out before the write is completed, it will be broken, so don't imitate the good kids.

    Cache

    Cache

     

    Moving an instance from an existing proxmox environment

    I'm addicted to many things, but I'll skip it because it's too long to explain. If you read the error messages carefully, you can manage it. If you don't understand what's wrong with the error messages, you can figure out what's wrong with them by reading the source code. Let's do our best. You can't migrate if it's linked with other VMs. You can't migrate if you have a physical drive or if you have a CloudInit device mounted. Remove the device. If you haven't created a Cluster in-house yet, create a Cluster in your existing Proxmox environment and add a new virtual environment to it. To be honest, I'm not very good at infrastructure, so you can manage this area.We are looking for an engineer.It is! (Working at the head office in Tatsuno City, Hyogo Prefecture)

     

    So, did you go faster?

    Here's a comparison of how long it takes to test our learning box (automated back-end testing with PHPUnit)

     

    comparison results

    • aws environment(t2.small): 2.63 minutes
    • Old Proxmox environment (Core i5 9600K): 1.22 minutes
    • New Proxmox environment (Core i9 10900): 1.1 minutes

    The difference between these two environments is not so big, but the difference between them is obvious. c5 is a little better, but the difference between them is still big.

     

    Operating frequency during automatic test

    It is stable at 2.8GHz when no load is applied, but when load is applied, it goes up to around 5GHz in an instant.

    Faster automated testing is directly related to work efficiency.

    Aside from strict TDD or not, automated testing is an essential part of development above a certain size. If a test result results in an error, or if you create a new test, you can't move on to the next one until the automated testing process is complete. On a busy day, you may run twenty or thirty tests per day, and if you can save a minute per test, you can save that much time, develop new features and improve the quality of your code.

     

    Future Policy

    With the construction of the Proxmox environment, the number of hardware supporting the virtual environment was reduced to two, and migration between virtual environments was possible. However, building a High Availability (HA) environment requires three servers, and we plan to build a third environment at the same time as the release of the third generation of Ryzen, to achieve a stable private cloud.

    Get started with free compliance training!
    banner

    • Comment ( 0 )

    • Trackbacks are closed.

    1. No comments yet.

    Related posts

    No related posts.