I'm deploying Lucee on docker and running on EKS. ...
# lucee
p
I'm deploying Lucee on docker and running on EKS. I have the JVM memory args set to
-Xms2048m -Xmx2048m
(2GB). But it appears that when the container/Lucee starts up it uses around 4GB and then drops. Shouldn't the JVM args limit the memory available to Lucee/Java? Is that normal for high memory allocation on startup?
b
Prolly non heap memory
Your operating system will sometimes report more memory used than your heap is
p
hmm...in EKS I'm setting the memor limit to 2GB
Copy code
resources:
            limits:
              cpu: 1000m
              memory: 2160Mi
            requests:
              cpu: 500m
              memory: 2160Mi
but I think that's for the container (OS+Lucee) if I want to give JVM 2GB then I should probably increase that limit to 4GB (because that's apparantly what's being used on startup)?
q
Smaller Lucee instances on 5.4 official images run swimmingly at 1GB. Most of my customer's apps run at 2GB.
But I expect what Brad is saying is correct -- the non-heap memory is probably being misreported.
p
We’re using
lucee/lucee:5.4.5.15-SNAPSHOT-light-nginx-tomcat9.0-jre11-temurin-jammy
image.
q
you could probably save some memory by not having nginx in that image and using an http proxy like traefik instead (or using the AWS load balancer). I'm personally not a fan of having the http server in the same image since it breaks the "one service. one function" rule.