The article will explain the Amdahl’s law in simple terms. We are going to demonstrate via a case study how throughput and latency are changing when you change the number of threads performing the tasks. We also help to draw right conclusions in the context of your own performance tuning task at hand.
First of all, let’s refresh our memory on the definitions.
- Throughput – number of computing tasks closed per time unit. Example – 1,000 credit card payments in a minute.
- Latency – delay between invoking the operation and getting the response. Example – maximum time taken to process a credit card transaction is 25ms.
The case we built is simulating a typical Java EE application doing some computation in the JVM and calling an external data source. Just like many of the Java EE apps out there – user initiates HttpRequest processed in the application server in turn calling either a relational database or a web service. The simulation achieves this via burning through CPU cycles in calculating large primes and enforcing the thread to sleep for a while. Even though the sleeping part sounds weird at the first glance – this is similar to how the threads are handled when waiting for an external resource. Sleeping / waiting threads are removed from the list of threads waiting for their schedule. Until the response arrives.
Please click here to read rest of the article.
- Java Specialists Newletter : Sep 14 Edition Hits The Stands Identity Crisis - by Dr. Heinz M. Kabutz
Abstract: The JavaDocs for method Object.hashCode() seems to suggest that the value is somehow related to memory location. However, in this newsletter we discover that there are several different algorithms and that Java 8 has new defaults to […]
- Are You Really Out Of Memory – Part II In this series of articles Nikita Salnikov-Tarnovski (LinkedIn), the co-founder of Plumbr discusses the performance and stability issues in Enterprise Java applications due to memory leaks. Nikita goes on to talk about various approaches to identifying memory leaks through the use of […]
- Top 10 Causes of Java EE Enterprise Performance Problems Performance problems are one of the biggest challenges to expect when designing and implementing Java EE related technologies. Some of these common problems can be faced when implementing either lightweight or large IT environments; which typically include several distributed systems […]
- Estimating Memory Consumption For Java Applications – Plumbr.eu This story goes back at least a decade, when I was first approached by a PHB with a question “How big servers are we going to need to buy for our production deployment”. The new and shiny system we have been building was nine months from production rollout and apparently the company had […]