DEV Community

loading...

Linux Capacity Planning Part -1

ajayatgit profile image Ajay Singh Updated on ・2 min read

This is going to be a series of blog post which will in introduce you with knowledge and tools necessary to analyze the historical data and plan for the increased resource to meet your future need as well as able to identify the resource bottleneck in your host machine.

We would be considering the Amazon Linux 2 as Linux operating system.

In this part, we will first look at a few important considerations which we should look during the planning.

  • when you discuss the capacity, in reality, you are initiating a discussion about the performance. Capacity and Performance always go hand in hand.
  • When we discuss performance we are trying to discuss the performance of an application on the system.
  • You have to measure and monitor performance to do any sort of capacity planning.

Below are the few important parameters which determine the capacity of your system and impact performance of your application.

  • CPU
  • RAM
  • IOPS (disk read and write)
  • list of open files
  • Network transfer rate

One of the tools which can help us in measuring these parameters in present in package name as sysstat.
The above package come by default installed on Amazon Linux 2 AMI.
The distro on which it is not installed you can install it by running below commands.

Command to install on different Distros:

On RedHat / CentOS / Fedora

yum install sysstat

On Debian / Ubuntu / Linux Mint

apt-get install sysstat

Once you have started the EC2 instance you can go and check if the sysstat service is active.

[root@ip-10-25-57-107 ec2-user]# service sysstat status
Redirecting to /bin/systemctl status sysstat.service
● sysstat.service - Resets System Activity Logs
   Loaded: loaded (/usr/lib/systemd/system/sysstat.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sat 2020-05-23 02:21:42 UTC; 3min 34s ago
  Process: 2690 ExecStart=/usr/lib64/sa/sa1 --boot (code=exited, status=0/SUCCESS)
 Main PID: 2690 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/sysstat.service

May 23 02:21:41 localhost systemd[1]: Starting Resets System Activity Logs...
May 23 02:21:42 localhost systemd[1]: Started Resets System Activity Logs.

In next post, we will look into various utilities provided under sysstat package.

Discussion (0)

pic
Editor guide