Best Practices for Efficient Resource Allocation
If you already have a working solution and are changing the architecture or type of infrastructure – for example moving from bare metal to the cloud – then you already know what virtual machines (VMs) your environment is running on and will work with it.
If you go with a clean slate, then you are guided by information from the provider of the application or system – hardware requirements. Don’t let that fool you, it also applies to the cloud. They can be minimal, then also recommended. But…
Resource optimization is up to you. You know – or rather your system administrator – knows how you work and what your needs are. Or they will find out. Anyway, in this article we will look at 5 points that will help you optimize computing resources and use them efficiently. Although some actually just sit, take up space, eat money and do “nothing”.
- Optimization from start to operation
- Load balancing
- HA
- Disaster recovery
- Backup
Optimization from start to operation
With a cloud environment, it’s like with a puppy – at first it gets a few small pieces of dog food, and as it grows, it gets bigger and bigger portions. You also wouldn’t give your pet a full bowl if he can hardly lick it.
80/10
It’s the same with VM. You need to start in proportion to what the machine will carry. We have already said that it is necessary to find the minimum requirements of the provider, because if we do not meet them, we will not even start the system.
The 80/10 rule is then an extension of this approach. I have identified the minimum requirements, but I will use a tenth of them for overhead – i.e. for the operation of the operating system.
But if it still doesn’t add up to 100%, you’re right. No, don’t worry, we can count. It’s just optimal not to use the resources to the maximum. So take 10% of the total for OS, but don’t use the other 90% for traffic, that’s not optimization, that’s preparing for disaster.
Benchmarks
Now that we have established the minimum requirements and calculated the overhead, should you immediately start the VM with the recommended parameters, and not the minimum ones?
In this regard, best practices dictate that it is optimal to do your own performance tests. Run the system on minimal resources and let users there without restrictions. Let them do what they want there and give the app a real run. Thanks to this, you can see what kind of load this normal traffic represents.
Based on this data, you can easily optimize resources. Keep in mind that the recommendations are general, but your business is unique. So trust, but do your own benchmarks.
Scaling various types of resources
The words scale and optimize carry a vector of both sides – increase, decrease, inflate, deflate. But beware, not every type of computing resource is this flexible.
You can increase and decrease the CPU and RAM while running, but do not do this with the disks. We can increase the disk space quite easily, but reducing it is already a problem. Not that it couldn’t be done.
But imagine having a photo embedded on edible paper all over the top of the cake. If you cut the cake, will the photo remain whole? No, it ends up in someone’s stomach. And this is not what you want to happen to your data.
It is therefore advisable not to have big eyes and rather to start with a smaller disk space and then increase it. Because otherwise, you could end up with those big eyes falling out of your sockets because you’d either be paying for way more than you need or you’ll have to undergo anabasis of disk reduction.
Load balancing
A phrase that appears almost everywhere and all companies feel that they have to use it. The problem is that it doesn’t always work.
First of all, you might not even need one. Because load balancing refers to systems that can be overloaded by how much users want from it – either there are too many or they want too much. If this is not your case, you can rejoice – load balancing does not concern you.
Secondly – the logic of the application may be such that load balancing does not make sense in certain steps. If the steps in the logic cannot be done at the same time, then even the most brilliant load balancing will not help you.
So it can be seen that you need to consider the needs of your business and the needs of the application or system you intend to use. Don’t do any hooray actions, but sit down and think about what you actually need from the load balancer.
Should it be application or network? Is it to optimize resources, minimize outages or improve availability? Does it even make sense to incorporate it?
Because the load balancer requires additional resources and if you don’t need them, then again something extra will be paid unnecessarily.
HA
This is not something like an AHA moment, but high availability. For some companies, this is the basis of operation. Take e-shops for example. If they weren’t available, they would lose a lot of customers.
Again, the question is whether it is important for your company to maintain maximum availability of the application or system. It is necessary to evaluate whether it will compensate you for the costs, which in the ideal case will be at least double. HA is simply an exact copy that takes over when something goes wrong.
If you decide on HA, then make full use of the system and don’t let the copy just sit idle. For normal operation, the infrastructure built in this way can be used precisely for load balancing.
When everything is fine, it balances the load, when something goes wrong, it takes over full traffic. No downtime.
Disaster recovery
What does the plan do for the efficient allocation of resources? It is one of its main parts. A disaster recovery plan describes what to do, but part of it is also where to do it.
When your primary operating environment does fail, this plan tells you what and where to do to get it back up and running. And where, of course, means the cost of the resources that will get you running in that case. Until then, you’re just paying for nothing productive.
It’s like insurance – you pay, pay, for nothing really, but when something happens, you’re really glad you paid for that nothing. It’s the same with disaster recovery. The size and readiness of the replacement environment will depend on your needs and the need to ensure operations with as little downtime as possible.
So this step awaits you already when choosing the infrastructure, because both the bare metal and the cloud have their own specifics on how best to approach disaster recovery.
Backup
Another glutton for no reason. No, that’s not true here either. Backup is something that should be an immediate part of every business and something that is permanently underestimated.
Your data is one of the most valuable things you have. Jewelry and valuables belong in the safe and copies of company data on a backup disk. Its size will then depend on two basic parameters
- frequency
- count
How often do you need to backup? After what interval you need to make a backup because you can’t afford to lose data. Week? Day? Hour? That’s up to you, but set the interval to really ensure the safety of the data you need to keep.
Then you also need to consider how many copies to hold. This may be necessary so that you can compare individual copies and find the error efficiently. Quite often the user one.
These parameters will then show you which optimal resources to assign to the backup.
Summary
Computing resources in the company are not only used for the operations themselves. As we have shown, you need to clarify in the company what resources your operation needs, what your backup and what your last rescue is. Is that too much? So contact us, we will find the optimal resources for you as well.