Flexible Magnolia Hostingin the Cloud
Mathias Seiler
www.mirocloud.com
About us
☁ VMware vCloud™ Powered Service Provider
☁ Hosting hundreds of Magnolia CMS instances
☁ (Hosting Magnolia’s server infrastructure too)
Cloud starts today. With us.http://www.mirocloud.com/
www.mirocloud.com
A few words on Java
☁ Fast and scalable
☁ Stable
☁ But ... Eats memory for breakfast
www.mirocloud.com
A few words on Java
☁ Start with 256M RAM at least (!)
☁ For STK: 512M or more
☁ (btw: not taking Derby into account)
www.mirocloud.com
How to scale?
☁ Throw hardware at the problem?
☁ Try to optimize memory allocations?
☁ Magic?
But before that ...
www.mirocloud.com
About Memory
☁ How is JVM memory “seen” by the OS (kernel) ?
www.mirocloud.com
About Memory
☁ Like a big chunk of memory assigned to a process.
☁ Kernel won’t manage it (except if swapping!)
☁ No visibility
☁ Extremely painful if it’s virtual memory(on a hypervisor, set full reservations)
www.mirocloud.com
Quick poll
☁ Who’s using VMware (vSphere) ?
☁ Hyper-V ?
☁ Xen ?
☁ KVM?
☁ Any other virtualization technology?
www.mirocloud.com
EM4J
☁ Part of VMware vFabric
☁ Elastic Memory for Java
☁ Java Heap Memory Pooling
www.mirocloud.com
How does it work?
☁ Ballooning
☁ Coordination with the Hypervisor
www.mirocloud.com
How does it work?
☁ Balance memory between VMs and hosts*
(*taking VMware’s Distributed Resource Scheduler into account)
www.mirocloud.com
How does it work?OS
JVM
Balloon
OS
JVM
Balloon
OS
JVM
Balloon
www.mirocloud.com
How does it work?
ESXi
vFabric tc
Balloon.jar
OS
Magnolia ...
www.mirocloud.com
Why?
☁ Less memory = less cost/power/licenses ...
☁ (but the most interesting ...)
☁ It’s elastic!
www.mirocloud.com
What does this mean?
☁ You can run applications ...
☁ ... more dynamically
☁ ... with less or no OOM events at all
☁ ... without over-allocating memory
www.mirocloud.com
What does this mean?
☁ In fact:
☁ We even allocate more memorythan before!
☁ Because that allocation isthe maximum memory the JVMis going to consume.
www.mirocloud.com
Numbers
☁ You can save up to 40% of system memory(at least that’s what we measured)
☁ Even if you allocate more than you did before
www.mirocloud.com
“Elastic”
☁ real dynamic workload distribution(“cloud”)
☁ traffic / workload “spikes” flattened out
☁ easy configuration
www.mirocloud.com
Interesting notes
☁ It’s adaptive by design
☁ = very little performance impact
☁ more “busy” JVMs get morememory over time
Top Related