× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I made a mistake in my previous message regarding the first test consuming
60% CPU. It was actually 5%. And the total elapsed time was 65 seconds -
not 15.

An analysis of the runtime numbers presented in the article, plus any
extrapolations we might make based on them gets a little complicated. But
if you will bare with me...

The only relevance of the sleep() in my opinion is that it provides an
opportunity to test the runtime performance of the 50 threads running
concurrently by allowing the JVM to complete thread instantiation first,
before the threads go into their 20K loops.

Without sleep() the first threads instantiated would have completed their
loops before subsequent threads were instantiated.

There is some blocking (waiting) associated with the string appending
within the loop, so it is quite unlikely that 100% CPU utilization can be
attributed to a single thread's looping.

My point about removing sleep() from the first test (and this is just my
extrapolation) is that the test would likely complete in about 15 seconds
(.278 times 50) plus some wait time, and would consume something less than
100% of one CPU, perhaps say 60%.

You can compare that with later tests which "submit" the threads, using a
Java interface which consumed 100% of 8 cores for 11 seconds. The JVM is
evidently handling the multitasking at a huge CPU overhead cost, rather
than letting the OS handle the multitasking. Nobody in their right mind
would do that with a real workload.

Nathan.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.