My study notes about System Performance
Well, as title suggests, this is like a cheat sheet about the topic. I have taken such notes while I was getting prepared for interviews and this is one of them. Those notes helped me to refresh my mind before having system design interviews. I think they might help you as well and I hope you will find them useful. You are welcome, If you would like to share your experiences or have comments. I would take it as an opportunity to learn from you. Enjoy reading.
System Performance
When we would like to evaluate the system’s performance, “Latency”, “Throughput” and “Availability” are the factors that we will think about. Lets briefly describe what are they.
Latency
Latency can be describe as the measurement of how long it takes for data to traverse in the system from one point to another. For example, it can be a network latency or I/O latency from disk, etc…
Lets look at the followings time measurements to read 1 MB sequential data as examples of data latencies:
From RAM => 0.01 ms
From SSD => 1 ms
From 1Gbps network => 10 ms
From HDD => 20 ms
A package traverse between continents => 150 ms
Throughput
Throughput means that how much work a machine/system can perform in a given period of time. For example, network can carry 1GB per second which is a throughput. Given time is 1 second and 1 GB is the amount of data to transport.
So it can be said that Latency and Throughput is correlated, but not always. If there is a high latency, it will decrease the throughput. However, low latency doesn’t mean high throughput since, throughput might be depend on some other factors like computational power etc.
Availability
What happens if server/ network/ database etc. fails? Is the system resistant to the failures. So the availability measurement answers these questions. Availability mostly measured as a percentage of a system’s uptime in a given year. Most of the online services have given guarantee of service availability to their users which is called as SLA ( Service Level Agreement )
Redundancy is the keyword of having an available system. Redundancy means in this context that, having multiples of the same system which one can take over the load in case of the failure of the other. Lets have a quick look of possible implementations of redundancy.
Active Redundancy: There are the multiple instances of the same component which are working together simultaneously. Airplane engines are the good example of this type of redundancy. Airplane has two engines running at the same time, but if one of them fails, airplane can function smoothly.
Passive Redundancy: There are the multiple instances of the same component, but only one of them is working and the others are inactive. If the working instance fails, then one of the inactives gets activated.
This is the end of my notes for this topic. Thanks for reading it and I hope you find it usefull. Feedbacks, thoughts, suggestions, ideas are welcomed, please share what you have in your mind.