Charles Oliver Nutter schrieb: > Jochen Theodorou wrote: >> I think there is not enough data to see a trend. I modified your test, >> made it run from 1-20 threads and for 50 loops, making an average time >> containing the time it took to execute all threads and put these in a >> diagram. I used a Q6600 Quadcore intel CPU with java 1.6.0_03-b05 on >> Linux 2.6.22-14-generic #1 SMP x86_64 GNU/Linux. What I can see is that >> the time constantly goes up until 4 Threads are reached, my number of >> CPUs. Using 5 threads is takes less time than using 4, but after that >> the time looks more or less constant. >> >> This looks quite scalable to me. > > You did notice the code splits the number of iterations by the number of > threads, right? At the very least, the amount of time taken to run all > threads should go down.
why? If I have 1 CPU and two threads, each of them running t seconds, shouldn't the time then be 2*t? Everything over 2*t would be the thread handling overhead. since you let 1 Thread run n iteration taking time t and then 2 Threads with n/2 iterations... shouldn't the total time then still be t? If you want to tell me that running with 3 threads takes longer than running with one thread and this should not happen, then yes, probably, but that is not what I understand from scalability. I do understand that if you go to big n and the total time increases much, then the scalability is bad. If you look at 7 or 20 Threads, then this does not happen. Only when the number of threads is lower this happens. So you could say the JVM in 1.6 does not scale well for a lower number of Threads, but does for a high number of threads... > Run the same test in Java 5 and you'll see that Java 6 does not scale > properly at all for this test. I will later bye blackdrag -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead (http://groovy.codehaus.org) http://blackdragsview.blogspot.com/ http://www.g2one.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
