Skip to content

Instantly share code, notes, and snippets.

@benkamphaus
Last active June 28, 2022 16:42
Show Gist options
  • Save benkamphaus/6f764dba7f254a879190 to your computer and use it in GitHub Desktop.
Save benkamphaus/6f764dba7f254a879190 to your computer and use it in GitHub Desktop.
High throughput Datomic Transactor AMI config -- creds/region info removed, only perf related fields. For typical deployments you should prefer the defaults -- these settings are for very high throughput systems.

What is this gist?

This is just a snapshot of what a high throughput Datomic transactor config looks like (with credentials/region, etc. settings elided).

I do not recommend cargo culting these settings for lower throughput systems. In those cases you should prefer the defaults.

Please refer to the capacity planning docs for a more nuanced understanding.

Warnings out of the way, here is how to use these reference settings:

  • If you're not getting enough throughput, linearly scale your performance settings from the defaults to these higher throughput settings.
  • Measure your performance via logs and metrics to verify performance is improving whenver you change settings.
    • Only accept those changes if performance improves!
  • Check to make sure your peers are transacting data in a way that accommodates high throughput as described here.
  • If you see :StoragePutMsec latencies increase, or see :StoragePutBackoffMsec, then you need to address storage provisioning.
datomic-version=0.9.5350
aws-instance-type=m3.xlarge
#aws-instance-type=c3.2xlarge -- diminishing returns but some perf gain
aws-instance-monitoring=true
aws-autoscaling-group-size=2 #ha, could be 1 with no ha
java-xmx=12G
java-opts=
protocol=ddb
memory-index-threshold=128m # only for high throughput/import, prefer default otherwise
memory-index-max=2g # only for high throughput/import, prefer default otherwise
object-cache-max=2g
#object-cache-max=4g 3-4 only if txor makes a lot of uniqueness checks, don't bump too high, results in gc pressure
write-concurrency=4 #can up with c3
read-concurrency=8 #can up with c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment