second try: just testing with the chunk size and gc tunning
This commit is contained in:
parent
9e5ec51315
commit
ab9d64b3e3
@ -15,7 +15,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
JAVA_OPTS=""
|
JAVA_OPTS="-Xms1024m -Xms1024m -XX:+UseParallelGC -XX:MaxHeapFreeRatio=10 -XX:ParallelGCThreads=2"
|
||||||
CHUNK_SIZE=$((8 * 1024 * 1024))
|
CHUNK_SIZE=$((50 * 1024 * 1024))
|
||||||
java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar \
|
java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar \
|
||||||
dev.morling.onebrc.CalculateAverage_imrafaelmerino $CHUNK_SIZE
|
dev.morling.onebrc.CalculateAverage_imrafaelmerino $CHUNK_SIZE
|
||||||
|
@ -144,6 +144,7 @@ public class CalculateAverage_imrafaelmerino {
|
|||||||
var field = new byte[FIELD_SIZE];
|
var field = new byte[FIELD_SIZE];
|
||||||
while (bb.position() < limit) {
|
while (bb.position() < limit) {
|
||||||
var fieldCurrentIndex = 0;
|
var fieldCurrentIndex = 0;
|
||||||
|
field[fieldCurrentIndex++] = bb.get();
|
||||||
while (bb.position() < limit) {
|
while (bb.position() < limit) {
|
||||||
var fieldByte = bb.get();
|
var fieldByte = bb.get();
|
||||||
if (fieldByte == ';')
|
if (fieldByte == ';')
|
||||||
|
Loading…
Reference in New Issue
Block a user