ankitsinghal commented on issue #661: HBASE-15519 Add per-user metrics with lossy counting URL: https://github.com/apache/hbase/pull/661#issuecomment-545163758 Thanks @joshelser, @busbey , I did some micro benchmarking to see an impact of concurrent users with large no. of requests and following the results. Test:- **Concurrent user test with 10 concurrent client each making 100k requests with 100 unique users** A rough test for benchmarking only(committed code has a different version of it) ``` @Test public void testLossyCountingOfUserMetrics() throws InterruptedException { Configuration conf = HBaseConfiguration.create(); int noOfUsers = 100000; int noOfConcurrentRequest = 10; Runnable runnable = new Runnable() { @Override public void run() { long start = System.nanoTime(); for (int i = 1; i <= noOfUsers; i++) { User.createUserForTesting(conf, "FOO" + noOfUsers%100, new String[0]).getUGI() .doAs(new PrivilegedAction<Void>() { @Override public Void run() { rsm.updateGet(tableName, 10); return null; } }); } System.out.println( "Time taken by " + Thread.currentThread() + " is " + (System.nanoTime() - start)/1000000+"ms"); } }; List<Thread> list = new ArrayList(); for (int i = 0; i < noOfConcurrentRequest; i++) { Thread t = new Thread(runnable); list.add(t); t.start(); } for (Thread t : list) { t.join(); } ``` With user aggregate:- ``` Time taken by Thread[Thread-7,5,FailOnTimeoutGroup] is 1403ms Time taken by Thread[Thread-6,5,FailOnTimeoutGroup] is 1432ms Time taken by Thread[Thread-10,5,FailOnTimeoutGroup] is 1441ms Time taken by Thread[Thread-2,5,FailOnTimeoutGroup] is 1463ms Time taken by Thread[Thread-8,5,FailOnTimeoutGroup] is 1469ms Time taken by Thread[Thread-5,5,FailOnTimeoutGroup] is 1475ms Time taken by Thread[Thread-9,5,FailOnTimeoutGroup] is 1475ms Time taken by Thread[Thread-3,5,FailOnTimeoutGroup] is 1489ms Time taken by Thread[Thread-4,5,FailOnTimeoutGroup] is 1493ms Time taken by Thread[Thread-11,5,FailOnTimeoutGroup] is 1498ms ``` Without user aggregate ``` Time taken by Thread[Thread-9,5,FailOnTimeoutGroup] is 1450ms Time taken by Thread[Thread-4,5,FailOnTimeoutGroup] is 1459ms Time taken by Thread[Thread-6,5,FailOnTimeoutGroup] is 1461ms Time taken by Thread[Thread-5,5,FailOnTimeoutGroup] is 1462ms Time taken by Thread[Thread-10,5,FailOnTimeoutGroup] is 1467ms Time taken by Thread[Thread-3,5,FailOnTimeoutGroup] is 1469ms Time taken by Thread[Thread-8,5,FailOnTimeoutGroup] is 1470ms Time taken by Thread[Thread-2,5,FailOnTimeoutGroup] is 1474ms Time taken by Thread[Thread-11,5,FailOnTimeoutGroup] is 1474ms Time taken by Thread[Thread-7,5,FailOnTimeoutGroup] is 1475ms ``` Conclusion:- Time taken is almost the same , (though require a small change for non-rpc test https://github.com/apache/hbase/pull/661/commits/c28b03eb84c1ea8d0664069b8e02a02040780215 to get system user)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
