Performance
The Krati distribution has included a number of tests for collecting performance statistics.
If you have a Krati distribution with versions 0.3.4 and above, you can simply run the command
below to collect read/write throughput and latency numbers on your own computer.
ant test.loggc -Dtests.to.run=TestDataCache
If you want to evaluate DataCache with MappedSegment and ChannelSegment, you can run the following commands respectively.
ant test.loggc -Dtests.to.run=TestDataCacheMapped
ant test.loggc -Dtests.to.run=TestDataCacheChannel
The Krati distribution also includes other peroformance tests on data store classes. You might want to play with these tests to get a general idea of Krati performance.
Test Configuration
This page provides a quick glance of Krati performance. The performance figures were collected using the setup below:
- Krati Configuration
- 1 Writer
- 4 Readers
- Data Size: 0.5~2 KB, Avg. 1 KB
- Batch Size: 10,000
- Segment Size: 256 MB
- Member Count: 5,000,000 (typical partition size)
- Test Machine
- Mac OS X Version: 10.5.8
- Processor: 2 x 2.26 GHz Quad-Core Intel Xeon
- Memory: 24 GB 1066 MHz DDR3
- Startup Disk: Macintosh HD
- Java 6
- Sun Hotspot JVM
- -server -Xmx16G
Read/Write Throughput
The write throughput is approximately 20~30 writes per millisecond for MemorySegment and roughly 10~20 writes per millisecond for MappedSegment and ChannelSegment. The persistency and recovery achieved via disk files and redo logs have an impact on write throughput.
The read throughput is approximately 1000~1200 writes per reader thread per millisecond for MemorySegment. It is an order of magnitude faster than throughput obtained using MappedSegment or ChannelSegment.
Read/Write Latency
The ChannelSegment has the highest write latency. As shown in the figure below, approximately 80% of writes have a latency between 10 and 50 microseconds. The write latencies for MemorySegment and MappedSegment are approximately on the same level with the majority of writes finished between 1 and 10 microseconds.
The read latency for MemorySegment is under 1 microsecond. In contrast, over 95% of reads from ChannelSegment range between 10 and 50 microseconds. MappedSegment is in the middle.
For an in-depth comparison of Krati and BDB JE, please refer to A Thorough Look at Krati vs. BDB JE - A Comparison of Throughput, Latency and GC.