Just in case can help to anybody.
I'm using ZAP docker with zap.sh:
docker run -u zap -v /tmp/:/zap/wrk/:rw --rm -ti --name owasp_zap -p 8090:8090 zap:latest zap.sh -daemon -port 8090 -host x.x.x.x -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true -config api.key=mykey -addoninstallall
I have checked that the assigned xmx by default is a quarter of the available memory (see these 3 examples)
Example1:
Available memory: 1968 MB
Using JVM args: -Xmx492m
Example2:
Available memory: 3942 MB
Using JVM args: -Xmx985m
Example3:
Available memory: 7470 MB
Using JVM args: -Xmx1867m
But you can always set jvm manually (as exaplained in
zap docs):
docker run -u zap -v /tmp/:/zap/wrk/:rw --rm -ti --name owasp_zap -p 8090:8090 zap:latest zap.sh -daemon -port 8090 -host x.x.x.x -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true -config api.key=mykey -addoninstallall -Xmx2048m
Question
Not sure what could be the best value to get it running as faster as possible but without waste resources? (I can assign to the container whatever memory is needed)