harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "weldon washburn (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4036) [drlvm][thread] significant performance degradation (scalability problem), in particular on DaCapo:xalan (2x)
Date Sat, 16 Jun 2007 21:22:26 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505541
] 

weldon washburn commented on HARMONY-4036:
------------------------------------------

I looked at read_writer_lock_table_3.patch.   Some comments:

1)
 This seems to be a generic read/writer lock.  How about clean up the API and make it a generic
utility?  Other modules (concurrent GC?) might want to use it.

2)
Does this patch account for all of the performance problems reported in this JIRA?  I had
noticed on a 4-way that it was necessary to change SPIN_COUNT.   (Does SPIN_COUNT have any
effect on a UP vs MP??)

> [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
>            Assignee: weldon washburn
>            Priority: Critical
>         Attachments: reader_writer_lock_table.patch, reader_writer_lock_table_3.patch,
readers_writers_lock_table_2.patch, 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 ThreadTest <loops>  <threads number>
> (For instance, "java  -Xem:server -XX:vm.dlls=gc_cc.dll -Xmx900m -Xms900m ThreadTest
5 4" or "java -Xem:server -XX:vm.dlls=gc_cc.dll -Xmx900m -Xms900mThreadTest 5 1". These ones
are used by me to create the table mentioned above).

-- 
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