Skip to content

Instantly share code, notes, and snippets.

@tobert
Last active January 31, 2022 15:22
Show Gist options
  • Select an option

  • Save tobert/ea9328e4873441c7fc34 to your computer and use it in GitHub Desktop.

Select an option

Save tobert/ea9328e4873441c7fc34 to your computer and use it in GitHub Desktop.
G1GC / CMS
chdir: {{ .DataDir }}
stdin: /dev/null
stdout: /data/log/console.log
stderr: /data/log/console.log
uid: 1337
gid: 1337
argv:
- /usr/bin/java
- -ea
- -javaagent:{{ glob "" "/opt/cassandra/lib/jamm-*.jar" }}
- -XX:+CMSClassUnloadingEnabled
- -XX:+UseThreadPriorities
- -XX:ThreadPriorityPolicy=42
- -Xmx8G
- -Xms8G
- -Xmn2G
- -XX:+HeapDumpOnOutOfMemoryError
- -Xss256k
- -XX:StringTableSize=1000003
- -XX:+UseParNewGC
- -XX:+UseConcMarkSweepGC
- -XX:+CMSParallelRemarkEnabled
- -XX:SurvivorRatio=8
- -XX:MaxTenuringThreshold=1
- -XX:CMSInitiatingOccupancyFraction=75
- -XX:+UseCMSInitiatingOccupancyOnly
- -XX:+UseTLAB
- -XX:CompileCommandFile={{ .ConfDir }}/hotspot_compiler
- -XX:+UseCondCardMark
- -XX:+CMSParallelInitialMarkEnabled
- -XX:+CMSEdenChunksRecordAlways
- -Djava.net.preferIPv4Stack=true
- -Dcom.sun.management.jmxremote.port={{ .JmxPort }}
- -Dcom.sun.management.jmxremote.rmi.port={{ .JmxPort }}
- -Dcom.sun.management.jmxremote.ssl=false
- -Dcom.sun.management.jmxremote.authenticate=false
- -Dlog4j.configuration=log4j-server.properties
- -Dlog4j.defaultInitOverride=true
- -Dcassandra.logdir={{ .LogDir }}
- -Dcassandra-foreground=yes
- -cp
- {{ glob ":" .ConfDir .LibDir "/opt/cassandra/lib/*.jar" }}
- org.apache.cassandra.service.CassandraDaemon
{{ range .ExtraArgs }} - {{ . }}
{{ end }}
Results:
op rate : 62196 [WRITE:62196]
partition rate : 62196 [WRITE:62196]
row rate : 62196 [WRITE:62196]
latency mean : 3.2 [WRITE:3.2]
latency median : 1.6 [WRITE:1.6]
latency 95th percentile : 5.1 [WRITE:5.1]
latency 99th percentile : 8.3 [WRITE:8.3]
latency 99.9th percentile : 185.8 [WRITE:185.8]
latency max : 1615.3 [WRITE:1615.3]
Total partitions : 50000000 [WRITE:50000000]
Total errors : 0 [WRITE:0]
total gc count : 0
total gc mb : 0
total gc time (s) : 0
avg gc time(ms) : NaN
stdev gc time(ms) : 0
Total operation time : 00:13:23
chdir: /data
stdin: /dev/null
stdout: /data/log/console.log
stderr: /data/log/console.log
uid: 1337
gid: 1337
argv:
- /usr/bin/java
- -ea
- -javaagent:{{ glob "" "/opt/cassandra/lib/jamm-*.jar" }}
- -Xmx8G
- -Xms8G
- -Xss256k
- -XX:+UseG1GC # use garbage-first collection
- -XX:InitiatingHeapOccupancyPercent=60 # don't do mixed mode until the heap is this full
- -XX:MaxGCPauseMillis=1000 # default is 200ms
- -XX:+AlwaysPreTouch # allocate and zero (force fault) heap memory on startup
- -XX:+UseTLAB # thread local allocation blocks
- -XX:+ResizeTLAB # auto-optimize TLAB size https://blogs.oracle.com/jonthecollector/entry/the_real_thing
- -XX:-UseBiasedLocking # disable biased locking for cassandra
- -XX:StringTableSize=1000003
- -XX:CompileCommandFile=/data/conf/hotspot_compiler
- -Djava.net.preferIPv4Stack=true
- -Dcom.sun.management.jmxremote.port=7199
- -Dcom.sun.management.jmxremote.rmi.port=7199
- -Dcom.sun.management.jmxremote.ssl=false
- -Dcom.sun.management.jmxremote.authenticate=false
- -Dlog4j.defaultInitOverride=true
- -Dlog4j.configuration=log4j-server.properties # cassandra <= 2.0
- -Dlogback.configurationFile=logback.xml # cassandra >= 2.1
- -Dcassandra.logdir=/data/log
- -Dcassandra-foreground=yes
- -XX:+HeapDumpOnOutOfMemoryError
- -XX:+PrintGCDetails
- -XX:+PrintAdaptiveSizePolicy
- -XX:+PrintGCApplicationStoppedTime
- -XX:+PrintPromotionFailure
- -Xloggc:/data/log/gc.log
- -XX:+UseGCLogFileRotation
- -XX:NumberOfGCLogFiles=10
- -XX:GCLogFileSize=10M
- -cp
- {{ glob ":" "/data/conf" "/data/lib" "/opt/cassandra/lib/*.jar" }}
- org.apache.cassandra.service.CassandraDaemon
{{ range .ExtraArgs }} - {{ . }}
{{ end }}
Results:
op rate : 74379 [WRITE:74379]
partition rate : 74379 [WRITE:74379]
row rate : 74379 [WRITE:74379]
latency mean : 2.7 [WRITE:2.7]
latency median : 1.7 [WRITE:1.7]
latency 95th percentile : 4.9 [WRITE:4.9]
latency 99th percentile : 7.5 [WRITE:7.5]
latency 99.9th percentile : 21.7 [WRITE:21.7]
latency max : 2901.2 [WRITE:2901.2]
Total partitions : 50000000 [WRITE:50000000]
Total errors : 0 [WRITE:0]
total gc count : 0
total gc mb : 0
total gc time (s) : 0
avg gc time(ms) : NaN
stdev gc time(ms) : 0
Total operation time : 00:11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment