aws-mock
aws-mock copied to clipboard
jvm heap failure with large number of instances
Large number of instances can failure the jvm - see class AbstractMockEc2Instance
, which makes use of java.util.Timer
and can be a probable cause. That means every mock EC2 instance runs in a separate jvm thread based on java.util.Timer
, which consumes considerable amount of resources and large number of threads could easily fail the jvm.
For now we set a large jvm heap size in gradle.properties
of 4GB heap in memory to afford 30k mock EC2 instances successfully, which is fairly a large number though.
However, we need to explore further options that can substitute the current java.util.Timer
based model and have the performance improved.
This is an enhancement, as aws-mock already works fine for a large number of instances. This is only to increase that already large number.