Very broad question here. These days, how much mem...
# lucee
a
Very broad question here. These days, how much memory do you allocate to a Docker container running Lucee (from the official image) for a low traffic web app? I've just found out we're allocating "only"(?) 4GB between three instances of our app on the same VPS... medium, low and very low traffic respectively.
z
how much memory are they using?
a
That would not impact the answer I am looking for, which is a baseline.
z
every application is different, what do you mean by baseline?
The Lucee installer defaults to 256-512mb
1
a
I'd not give under a gig to an app typically
1
I think our standard container size is about 3gb but also dependent on size of the code base, lots of framework = lots of classes
which can make the baseline regardless of traffic a bit higher
z
first test is to just measure what the memory usage is after starting lucee and letting the application startup, I know that obviously an app preside like to play hungry hungry hippos with memory 🙂
then i'd break out something like jmeter and throw some load at the app
then being a complete sadist, I'd then throw crazy amounts of traffic at it and see what breaks, just for shits n giggles
b
Lucee itself will boot up and serve traffic with 512 MB, but it won't have much head room. For low traffic that's not doing any sort of long processing or large file uploads, etc you could probably get away with 1-2 Gigs as a starting point and then monitor the heap for a bit and see if it's comfortable
2
Java's GC, as I often say, is "lazy" in that it won't collect until it needs to. Meaning, an app that only needs 2 Gigs when given 12 GB would happily slurp up 10 of those before bothering to run a major collection. This is just because GC waits until it needs to run, but sometimes this confuses people into thinking it's a requirement. My rule of thumb is when you run a full GC (there's a handy button in FusionReactor for this), so long as the used heap comes down significantly, that means you're in good shape.
When given a smaller heap, Java will essentially just run full collections more often than normal (but they will be a little faster as a tradeoff)
a
Cheers all.