flexible magnolia hosting in the cloud

27
Flexible Magnolia Hosting in the Cloud Mathias Seiler

Upload: boris-kraft

Post on 28-Nov-2014

697 views

Category:

Technology


0 download

DESCRIPTION

By pooling JVM memory across virtual machines it's possible to operate flexible Magnolia CMS instances and overcome typical Java issues like out-of-memory events or resource over-provisioning. Being experienced in providing IaaS, we can show you real-world examples of how we do it and what benefits can be achieved by hosting Magnolia CMS in a VMware vCloud™ Powered environment.

TRANSCRIPT

Page 1: Flexible Magnolia Hosting in the Cloud

Flexible Magnolia Hostingin the Cloud

Mathias Seiler

Page 2: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

About us

☁ VMware vCloud™ Powered Service Provider

☁ Hosting hundreds of Magnolia CMS instances

☁ (Hosting Magnolia’s server infrastructure too)

Page 3: Flexible Magnolia Hosting in the Cloud

Cloud starts today. With us.http://www.mirocloud.com/

Page 4: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

A few words on Java

☁ Fast and scalable

☁ Stable

☁ But ... Eats memory for breakfast

Page 5: Flexible Magnolia Hosting in the Cloud

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)

Page 6: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How to scale?

☁ Throw hardware at the problem?

☁ Try to optimize memory allocations?

☁ Magic?

Page 7: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

Do something crazy!

Page 8: Flexible Magnolia Hosting in the Cloud

But before that ...

Page 9: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

About Memory

☁ How is JVM memory “seen” by the OS (kernel) ?

Page 10: Flexible Magnolia Hosting in the Cloud

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)

Page 11: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

Quick poll

☁ Who’s using VMware (vSphere) ?

☁ Hyper-V ?

☁ Xen ?

☁ KVM?

☁ Any other virtualization technology?

Page 12: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

EM4J

☁ Part of VMware vFabric

☁ Elastic Memory for Java

☁ Java Heap Memory Pooling

Page 13: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

Memory Pool

Pooling memory?

Page 14: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How does it work?

☁ Ballooning

☁ Coordination with the Hypervisor

Page 15: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How does it work?OS

Balloon

Page 16: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How does it work?OS

JVM

Balloon

Page 17: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How does it work?OS

JVM

Balloon

Page 18: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How does it work?

☁ Balance memory between VMs and hosts*

(*taking VMware’s Distributed Resource Scheduler into account)

Page 19: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How does it work?OS

JVM

Balloon

OS

JVM

Balloon

OS

JVM

Balloon

Page 20: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

How does it work?

ESXi

vFabric tc

Balloon.jar

OS

Magnolia ...

Page 21: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

Why?

☁ Less memory = less cost/power/licenses ...

☁ (but the most interesting ...)

☁ It’s elastic!

Page 22: Flexible Magnolia Hosting in the Cloud

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

Page 23: Flexible Magnolia Hosting in the Cloud

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.

Page 24: Flexible Magnolia Hosting in the Cloud

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

Page 25: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

“Elastic”

☁ real dynamic workload distribution(“cloud”)

☁ traffic / workload “spikes” flattened out

☁ easy configuration

Page 26: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

Interesting notes

☁ It’s adaptive by design

☁ = very little performance impact

☁ more “busy” JVMs get morememory over time

Page 27: Flexible Magnolia Hosting in the Cloud

www.mirocloud.com

Questions?