Conversation
| double latency = 0.0; | ||
| if (executionTime > 0) { | ||
| latency = 1000000.0 * executionTime / ops; | ||
| } |
There was a problem hiding this comment.
I know this logic has been used elsewhere in this file but can we please change this to not use doubles and millis to calculate execution time. Instead use System.nanoTime() and do calculations with long where it makes sense for latency etc we of course need double
There was a problem hiding this comment.
I am not exactly sure, why calculating in nanoseconds is better than milliseconds (both return long, but we need double for the division).
If we change that, it should be everywhere to keep it consistent. I'll create an issue, as I think that this is a bigger cleanup step.
There was a problem hiding this comment.
The problem with currentTimeMillis is that it returns the actual time, i.e. is not monotonic and that leads to obvious problems, e.g. if you are running a NTP service time can change while you run a benchmark. That is why it is recommended to use System.nanoTime().
There was a problem hiding this comment.
Ok sounds good. Will change all benchmark calculations in a new PR.
| } | ||
| long end = System.currentTimeMillis(); | ||
| double executionTime = ((double) (end - start)); | ||
| double latency = executionTime*1000.0 / ((double) batch); |
| String benchmarkTypes = "write|writeAsync|readSequential|readRandom|readSequentialAsync|readMultiStream|" | ||
| + "createFile|createFileAsync|createMultiFile|getKey|getFile|getFileAsync|enumerateDir|browseDir|" | ||
| + "createFile|createFileAsync|createMultiFile|getKey|getFile|getFileAsync|getMultiFile" | ||
| + "getMultiFileAsync|enumerateDir|browseDir|" |
There was a problem hiding this comment.
Can we make this more generic. Lot's of Strings duplicated and possible spelling errors.
I would like to see something like a map from string -> benchmark method
There was a problem hiding this comment.
I agree with this, there should be no need for string duplication.
I'd prefer to do this as a cleanup step and will create an issue.
| public static void usage(){ | ||
| System.out.println("Usage:"); | ||
| System.out.println("hdfsbench <readSequentialDirect|readSequentialHeap|readRandomDirect|readRandomHeap|writeSequentialHeap> <size> <iterations> <path>"); | ||
| System.out.println("hdfsbench <readSequentialDirect|readSequentialHeap|readRandomDirect|readRandomHeap|writeSequentialHeap|getFile|getFileIOPS> <size> <iterations> <path>"); |
There was a problem hiding this comment.
Again please make this more generic
| } | ||
| long end = System.currentTimeMillis(); | ||
| double iops = ((double)loop) / (end - start) * (double)1000.0; | ||
| double executionTime = ((double) (end - start)); |
| public static final String NAMENODE_DARPC_CLUSTERSIZE_KEY = "crail.namenode.darpc.clustersize"; | ||
| public static int NAMENODE_DARPC_CLUSTERSIZE = 128; | ||
|
|
||
| public static final String NAMENODE_DARPC_MEMPOOL_HUGEPAGEPATH_KEY = "crail.namenode.darpc.mempool.hugepagepath"; |
There was a problem hiding this comment.
I was under the impression we don't want this multilevel config anymore e.g. everything should be darpc.X
| protected AtomicLong renameOps; | ||
| protected AtomicLong getOps; | ||
| protected AtomicLong locationOps; | ||
| protected AtomicLong errorOps; |
There was a problem hiding this comment.
I prefer putting the Atomics in the stats class instead of making them protected
patrickstuedi
left a comment
There was a problem hiding this comment.
I think we should take out the code for the statistics that we only used internally (e.g., DaRPCServiceDispatcherStats.java)
5512a02 to
4140ce6
Compare
|
I removed the IOPS thread. Crail uses now the simple memory pool. I created two cleanup issues based on PepperJo's comments. Please have a look at the newest version. |
| } | ||
| DaRPCServiceDispatcher darpcService = new DaRPCServiceDispatcher(service); | ||
| this.namenodeServerGroup = DaRPCServerGroup.createServerGroup(darpcService, clusterAffinities, -1, DaRPCConstants.NAMENODE_DARPC_MAXINLINE, DaRPCConstants.NAMENODE_DARPC_POLLING, DaRPCConstants.NAMENODE_DARPC_RECVQUEUE, DaRPCConstants.NAMENODE_DARPC_SENDQUEUE, DaRPCConstants.NAMENODE_DARPC_POLLSIZE, DaRPCConstants.NAMENODE_DARPC_CLUSTERSIZE); | ||
| if (!DaRPCConstants.NAMENODE_DARPC_STATS.isEmpty()) { |
There was a problem hiding this comment.
Maybe it makes sense to treat crail.namenode.darpc.stats as a boolean or similar. I can see this being misinterpreted otherwise and set to "crail.namenode.darpc.stats false" or "crail.namenode.darpc.stats no".
…S and new HDFS benchmarks to measure IOPS.
8d8935a to
52aea73
Compare
| DaRPCConstants.NAMENODE_DARPC_MEMPOOL_ALIGNMENT, | ||
| DaRPCConstants.NAMENODE_DARPC_MEMPOOL_ALLOC_LIMIT | ||
| ); | ||
| String _clusterAffinities[] = DaRPCConstants.NAMENODE_DARPC_AFFINITY.split(","); |
There was a problem hiding this comment.
I would prefer doing all parsing in the DaRPCConstants.
There was a problem hiding this comment.
I did not add any parsing here. If you mean the split(), this is old code. I would prefer cleaning aup existing code in a separate PR
This PR contains changes to improve the number of IOPS:
be instantiated instead of original one, if we want to do measurements
Note: This PR has to be merged together with the corresponding DaRPC PR.