Utilization of multiple CPU / Core on Cloud

Utilization of multiple CPU / Core on Cloud

People want to go for AWS, so that it can perform better. AWS offer EC2 instances as infrastructure as a service(IaaS). Now, we can select the type of instance we are looking for and lunch it.

During the selection of any instance we generally consider the following points -

  • Location of instance, thus we can minimize the latency due to distance
  • Capacity of RAM or primary memory
  • No. of CPU

We can select the location according to the primary location of targeted users. Calculate the memory size against size of data need to process in any given point of time. Selection of these two parameters will directly impact on the performance of your application. Defiantly we have to take care about managing memory efficiently; although modern days framework taken care of this using garbage collector. Whereas, we need to develop our applications with ability with parallel processing, thus it can perform better with use of multiple CPUs.

We assume that applications of EC2 instance can handle higher number of requests, when we do the selection of 2, 4, 8 CPU. Obviously, it's increase the performance of Web (IIS or Apache) and Database (SQL or MySQL) server applications, which we use in our instance. However, our own application use only one single CPU for process any request.

Ability to perform multiple tasks doesn't ensure the ability to perform parallel processing. We don't need to understand the flow of executing processes. It's managed by OS or server applications. But, we should know that process is an instance of our own application, and every instances are identified by unique id. Now, we can split the internal flow of our application in multiple tasks and execute using the power of parallel processing.

We might consider a situation, where parallel processing can help us to response faster than serial processing.

Let's we have to process salary for all employees. So, we have to do two tasks -

  • Read salary related information from database.
  • Calculate salary.

We can run these two tasks parallelly. When instructions of first task will be busy to read records from database. Instructions of second task will do the actual calculations against those records which are already fetched from database by first task. Application, shouldn't need to wait for read all records first before start calculation.

nice explanation sir , maybe we could use elastic load balancing and auto scaling so we don't have to think about multiple regions latency and space/ process .

Like
Reply

To view or add a comment, sign in

More articles by Avik Das

Others also viewed

Explore content categories