harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evgeniya Maenkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4036) [drlvm][thread] significant performance degradation (scalability problem), in particular on DaCapo:xalan (2x)
Date Mon, 04 Jun 2007 12:14:36 GMT
[drlvm][thread] significant performance degradation (scalability problem), in particular on
DaCapo:xalan (2x)
-------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4036
                 URL: https://issues.apache.org/jira/browse/HARMONY-4036
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Evgeniya Maenkova
            Priority: Critical
         Attachments: ThreadTest.java

Significant performance degradation has been discovered. This happened between r541650-r541654.
More likely, this is r541653 (H-2742).
2x times degradation on Dacapo::xalan.

I wrote the simple reproducer (see please below and to be attached) and got the following
data on a machine with 4 logical processors:

                       1 thread     4 thread   4thr/1thr  
24-May          2828           9594         3.392504  (r541650)
31-May          2891           271394     93.87548 (r541654).
 
On r541654 version the system time increases significantly, cpu utilization is about 28% only.
Unlike r541654 version, where things are going well (cpu utilization ~80%).

Scale factor changed from 3.39 to 93.88.

The test is:



import java.io.IOException;

public class ThreadTest extends Thread {
	static private void doComputing(long n)
			throws IOException {
		int res = 1;
		for (int i = 1; i < 1000; i ++) {
			res *=i;
		}
	}

	public void doIt() throws Exception {
		for (int j = 0; j < 500000; j ++) {			
		    doComputing(getBD());			  
		}
	}
	
	static long bd = 0;
	
	static synchronized long getBD() {
		bd ++;		
		if (bd == Long.MAX_VALUE) {
			bd = 1;
		}
		return bd;
	}
	
	public void run() {
		for (int i = 0; i < loops; i ++) {
			System.out.println(i);
			try {
			   doIt();
			} catch (Exception e) {
				e.printStackTrace();
			}					
		}
	}
	public static int loops;
	public static void main(String[] args) throws Exception{
		loops = Integer.parseInt(args[0]);		
		int thrNum = Integer.parseInt(args[1]);
		long start = System.currentTimeMillis();
		Thread[] threads = new Thread[thrNum];
		for (int i = 0;  i < thrNum; i ++) {
		    threads[i] = new ThreadTest();
		    threads[i].start();
		}
		
        for (int i = 0;  i < thrNum; i ++) {
			threads[i].join();
		}
		System.out.println("result: " + (System.currentTimeMillis() - start));
	}

}

To run it: java -Xem:server -XX:vm.dlls=gc_cc.dll -Xmx900m -Xms900m TelcoTest <loops>
 <threads number>





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message