How to get more out of your business server

When you have hardware limitations on the enterprise server, that is, of number of CPUs, or computational units, RAM and hard disk, you are left with only software or/and organizational choices . Kind of like when you want to cover as many stops as possible depending on the bus fleet and a reasonable waiting time.

In a previous article, which I highly recommend reading to understand more of the discussion, I had talked about docker. This is a fast and now a standard way to have services packaged, ready to be thrown in the pan and consumed. They also encapsulate the operating system. So we can think of it as a ready-made virtual machine. On Linux there is such a thing, called lxd.

One of the problems with docker has to do with the size of the image, from which the container (the service) is derived. Because each image contains the operating system (which at best takes up 5MB), software (Python, R, etc.), libraries (dependencies) and more. Clearly there are stratagems to reduce this size. But if you have a server, physical or virtual, with about 128GB of hard disk, you’re tight if you also consider file backups (backups) and services that use so much memory because of what they store.

A concrete example?

The data dashboard based on R’s shiny library.

Half a GB may not seem like much, but when you consider that it is just one service, it becomes a lot.

Let’s take another example: Nextcloud, an alternative to google cloud:

The lightest version, with alpine linux, weighs almost 300MB (you can see it on the right). Not little, if you will shiny makes more of an impression since it does “less stuff.” And nextcloud, precisely because of what it does, turns out to be one of those services that takes up the most space over time: it is used to store documents, photos, etc. Files that weigh much more than structured data like certain Excel files or google sheets. For comparison, as of the date of writing this article, all materials related to Enterprise Statistics weigh more than 30GB. With growth we can estimate at 15GB per year.

On another operating system more niche than Ubuntu (Linux), FreeBSD, we have prisons (jails). Remember when in school or college you could access your user from any computer? Each user had their own hard disk space, usually less than 100MB. Jails work in a vaguely similar way: sort of like having multiple administrator users on Windows, but isolated, the key to understanding the word jails. In fact, in school it could happen that you could get into your friend’s space and play “tricks.” Prisons then allow you to install isolated services and also have backups.

Compared to docker, however, prisons require manual installation of services. At the performance level this approach gives advantages, partly because it does not start another operating system, but this is debated. At the space level, something is saved resulting, again, from not installing the operating system for every service as on docker. As a note I remember that lighter images generally have linux alpine.

It does not pay to cut pork with the same instrumentation as beef.

Similarly, nasty surprises can occur if the working environments are not isolated, as also anticipated with the previous solution. Each programming language allows you to create virtual environments (venv on python, renv on R), so that libraries installed at the system (computer) level don’t mess with the library specifications required for a project/service. The “it works on my computer” led to using docker, which provides reproducible environments (because it packages software and libraries). As you guess, this is the last type of isolation because it happens only on the development software. Whereas in the previous case we were before the software. And with docker we even stay outside the operating system. Space-wise it may seem the most efficient, because you only “throw away” the space of repeating libraries or dependencies. But so far, I admit, I have never heard services deployed for use (put into production) using virtual environments. Only services being tested/developed.

 

As a conclusion, it is also worth mentioning that you have to decide wisely how many services to host in a single server. It also depends on the size of the company, but I personally would not put nextcloud (an alternative to Google Drive / One Drive) in the same server that hosts the homemade company website. How to decide? Down to the use of computational resources and critical services. Short but by no means trivial decision meter.

Large companies worry less about the optimizations mentioned because the cloud tends to allow them to add computational resources flexibly. Until something goes wrong and some controller (a particular accountant) notices invoices with absurd figures.

As SMBs have more cost-related existential risks, we can hear from you in a free call to anticipate when you will need such a service.

Leave a Comment

Your email address will not be published. Required fields are marked *

Privacy Policy