The history of multi-tenancy is something like this. In the beginning
of computing, there was batch -- serial multi-tenancy. Robust but
ludicrously wasteful of meager resources. Then came timesharing (too
weak for production work) and transaction monitors (rigid and unsuitable
for interactive applications). The advent of cheaper computers lead to
the decomposition of applications into client and server components, and
server computing emerged. Initially the clients were specified ad hoc
programs, but the trended towards generic clients such as browsers. The
client side, however, did some computing, became primarily the human
interface. Behind the scenes, servers evolved.
The first generations of servers evolved from timesharing systems
initially designed for multi-tenancy, systems built by disciplined
professional engineers like Unix and VMS. The operating environment
developers worked for companies that competed on stability, and binary
compatibility across upgrades was the golden rule. New versions meant
new capabilities and new bugs, but running applications were expected to
continue to run without change. Big switcheroos were hidden by
coexisting versioned libraries and the like.
As PCs grew up, got faster, larger, and more reliable, the traditional
"soup to nuts" vertically integrated computer company were gradually
replaced by industry of independent hardware and software companies.
Rather than buying a VAX and getting VMS, companies bought computers
from A and operating software from B.
Operating systems, however, are large, expensive to develop and
maintain, and are remarkably unglamorous. Operating system development
was once funded from the high margins of proprietary hardware.
Commodization of computers cut deeply into margins. And, more
significantly, differentiation in operating systems went from an plus to
a minus as strong standards evolved. A few companies tried to ride the
emerging server wave -- SCO, OSF, System V, and Netware (ugh) -- but
none succeeded. What did succeed was open source operating systems --
Linux, BSD, FreeBSD, NetBSD, xBSD, yBSD, zBSD (the BSD proliferation
demonstrates Achilles 's heal of open source -- the inability of
hormonally challenged, angry, white, 27 year old males to agree on
anything but a clone or a standard).
So, after much evolution and many die-offs, we have an industry of
commodity hardware, one mega-successfully operating system vendor, and
an equally successful free operating system available in a dozen tints.
Linux is wonderfully reliable and incredibly efficient. But it is also
a wretched vehicle for multi-tenancy. Linux is a mono-theistic
operating system: There is one god, and his name is "root". To install
and manage an application or do anything of significance, you must be
root. But if you're root, you can do anything. So it just isn't
feasible to delegate rights to manage a single application. A second
equally serious problem is that open source developers, unlike their
disciplined predecessors, pride them selves on version to version
incompatibility, believing that all true software is built from source.
This means that upgrading, say, Apache or MySQL for application A is
almost guaranteed to take out application B.
It didn't take very long for organizations to realize that although
Linux was free, Linux administration was not, and something had to
give. What gave was multi-application tenancy on Linux servers. It was
much cheaper to buy a box for each application than to administer two or
more applications on a single box. The was wildly successful in solving
the problem and, incidentally, a great boon to Silicon Valley. This was
server sprawl, and while inefficient, had a solid economic
justification. The bean counters, however, discovered miniscule machine
utilization, which they abhorred.
Enter machine virtualization and hypervisors. Hypervisors address the
problems of server sprawl and under-utilization (I do hope the bean
counters don't discover how little oxygen we inhale is actually used).
They support multi-tenancy on servers while providing a degree of
administrative control not possible with physical servers. On the other
hand, they do nothing positive for scalability. Machine virtualization
is a dandy way to consolidate low volume applications that require more
presence than performance onto a single piece of hardware. Applications
that exceed the capabilities of single box are another story.
Virtualization gives them nothing but overhead, leaving the problem of
scaling to te application developers. Virtualization also does nothing
to simplify the administration of individual applications; in many ways
it make it worse since an administrator must manage both the application
and the host operating system than runs within a VM. Finally,
virtualization is relatively poor on resource sharing, requiring memory
to each of the host operating systems, having schedulers fighting
schedulers, and inducing overhead on every I/O operation (even dumb
operating systems know how to share executables and libraries).
There are other forms of multi-tenancy besides transaction monitors,
time sharing, and machine virtualization. The basic rules are simple:
1. One tenant should not be able to detect the presence of another
tenant.
2. One tenant should not be able to adversely affect another tenant.
3. Each tenant must see a stable environment
There are many ways to achieve this. Java comes very close in a single
JVM and succeeds completely with multiple JVMs. The Google application
engine does it, as does Azure. The common denominator is that in each
system an application runs in a rigorously defined sandbox from which
there is no escape. The Google app engine and Azure go a step further,
however, and support a sufficiently high level application definition to
permit automatic instantiation and failover. All all absolve
application administrators from system administration and all enable
application transparent infrastructure upgrade.
The Google and Microsoft models are just the vanguard of whole class of
controlled application infrastructures. All will have sandboxes,
rigorous APIs, load balancing, automatic instantiation, and failover.
All with compete to reduce the total cost applications -- development,
hosting, and administration. Some will be hosted services and other
will be available for private and small scale clouds. And some will
prevail and others will die.
Does virtualization of a future in this world? During the transition,
certainly. But in a data center where 90% of the servers are running a
common application infrastructure hosting sandboxed applications, it has
nothing to offer.
Multi-tenancy is an economic model to maximize profits…..
Virtualization is a technological innovation to the means (multi-tenancy) to an end (Profits)
From: cloud-c...@googlegroups.com [mailto:cloud-c...@googlegroups.com] On Behalf Of Miha Ahronovitz
Sent: Sunday, April 12, 2009 12:24
PM
To: cloud-c...@googlegroups.com
There has to be can economic basis. Hosting charges is simply the most
obvious of many schemes.
No, JVMs are virtualization of the java environment, not virtualization of the platform. JVMs are interpreter engines, nothing more.
This underscores why everyone is calling things “cloud”, since apparently just using a word blurs the reality for most people.
From: cloud-c...@googlegroups.com
[mailto:cloud-c...@googlegroups.com] On Behalf Of Jan Klincewicz
Sent: Monday, April 13, 2009 9:23 AM
To: cloud-c...@googlegroups.com
Subject: [ Cloud Computing ] Re: Cloud Computing and Multi-tenancy
Aren't JVMs
Virtualization" by definition ?? I am PRETTY sure that is what the
"V" stands for ....
--
Jim Starkey
President, NimbusDB, Inc.
978 526-1376
On Apr 13, 2009, at 04:31 , Jim Starkey wrote:
[...]
> Yes, I am arguing that multi-tenancy without virtualization is a
> better,
> cheaper, more efficient technology than virtualization.
Depends on what you're doing and what you're counting in the total cost.
I.e., virtualizing MS Windows pays off big for lots of reasons even if
it's is less efficient in terms of hardware utilization.
On Unix-ish systems, I've done it both ways and there are goods and
bads to both approaches. It really depends on lots of different
tradeoffs not the least of which is people's time, experience, and
competencies.
It's interesting to see how the old school apps are much more often
well-behaved sharing the bare metal while the tendency is for all of
the big, fancy, and all too over-complicated modern monstrosities tend
to have so much crap baked in that virtualization ends up being the
easiest way to manage them.
> Java can be part of a solution, but it isn't sufficient by itself. An
> application is more than code. An abstract application platform
> requires a comprehensive packaging mechanism that include code,
> templates, any local files, and policy. Everything required, in
> short,
> to instantiate and execute the application.
>
> Technically, Java falls a little short. Two applications in a single
> JVM can collide on class name and can interact through public class
> variables. I admire Java, but separate JVMs are necessary, which
> takes
> some of the lustre off.
Indeed. The sillinesses involving perm-gen space and classloaders is
a real PITA. The biggest performance constraint on multi-tenant Java
applications is the GC.
Take care,
John
Um, er, no... the JVM is a virtual runtime environment. Things like
HotSpot are a lot more sophisticated than just being an interpreter.
> This underscores why everyone is calling things “cloud”, since
> apparently just using a word blurs the reality for most people.
So true.
Take care,
John
Yes and no (I've written a few articles about it somewhere :-). There
are plenty of nasty problems in (over-)retention when one tries to get
rid of old versions (when, for instance loading new versions). Trying
to robustly do "multi-tenants" in a single JVM is asking for trouble...
> I agree that the GC is
> a large performance consideration, it always has been.
It's not just performance. In a multi-tenant situation, a badly
behaving tenant can easily destroy all of the utility for all of the
tenants just by being a bad citizen w.r.t. to GC.
> On the positive side,
> Java offers a rigorous security model that makes it a serious
> contender in
> this space.
Yes and no. There is all of the help in terms of things like
references but by the time one takes care of all of the various
issues, you're basically right back to separate instances of the JVM.
Of course, there are lots of security issues that people don't always
(know enough to) care about YMMV (such as timing attacks and eating up
randomness).
> I am not sure what you meant you meant in regards to the perm-gen
> space
> (perhaps that it is shared)?
Perm-gen space is indeed shared on a per-instance of the JVM basis and
it's a fixed size. There was one simple bug in a library that was
required by a library used by a framework that one of our contractors
used that ate perm-gen space and it ended up taking forever to track
down (for a variety of reasons including crappy tools and crappy
people). Classloader issues have also come up that can eat perm-gen
space.
Have fun,
John
OS instance virtualization is simplistic and so it works well for
humans at the cost of performance and hardware efficiency.
> Multi-tenancy can also be achieved through non-hypervisor
> virtualization
> technologies. For instance, the Grid Computing folks have been
> scheduling
> jobs on resources in a non-hypervisor way for over 10 to 15 years.
And process migration has been around for a lot longer in various
guises. Hint: you might want to check out some of the names on the old
Sprite OS papers from the 80's and 90's. :-)
> In Y2000-2004, there were some companies that did provisioning of
> resources
> without hypervisors, i.e provisioning on bare-metal dynamically.
>
> But what makes the hypervisor technology far better suited for cloud
> computing especially is the live migration of a running image from one
> system to another, in other words the very foundation for elasticity.
> (although no live migration is necessary for storage and network
> resources).
Sprite OS did that in the late 80's and it wasn't the only system to
allow for that. Plan 9 did but IIRC it was more in the early 90's.
> Now this can be done by bare metal provisioning also. But think of the
> latency involved in the bare-metal provisioning technique. You need
> to move
> the OS image from a SAN or a disk, boot it, configure it and
> commission it
> into the network to make it a functioning system.
>
> With hypervisors you do not have this latency, not at least this
> much. The
> Hypervisors are pretty efficient in moving a running system and with
> elastic
> IP you will have a running system very quickly, seamlessly up and
> running
> under the covers. Why does this matter?...
>
> If you have an e-commerce business and you have thousands or
> hundreds of
> thousands of customers performing transactions over the web/internet
> and if
> you need resource elasticity or failover, the hypervisor based
> virtualization has a distinct performance advantage in terms of
> latency over
> the bare-metal provisioning.
You seem to be comparing different parts of different things: the bare-
metal provisioning of, e.g., the entire OS plus applications with the
provisioning and movement of applications on top of a base OS with OS-
virtual-image provisioning (on top of a base/host OS).
With a good base OS, you can "provision" an app on top of it as fast,
if not a lot faster, and just as easily as doing an OS-virtual-image
(since all that is, really, is just another application). Using
chroot jails/containers/etc. for stricter isolation is old, mature
technologies and the performance can be quite good (especially w.r.t.
to the heavier-weight virtualization approaches).
As I've noted before, I do agree that if you have huge, brittle
"stacks" of libraries, frameworks, and applications, virtualizing the
entire OS is a good way to manage that complexity. But it's precisely
because it's a complexity management tool that I'd use it for that
situation.
FWIW, just as we learned 20 years ago with Sprite, process migration
is sexy but it's not as useful as people think and it has real costs.
I.e., it's not a silver bullet. Process/instance migration is a big
deal to the people selling virtualization as THE approach precisely
because they sell the notion that physical machines should be run with
lots of virtual instances and then we (or the system will magically)
move processes/images around for us when the load spikes. As with any
distributed sytems problem, that works great in some cases and
horribly in others.
Take care,
John
No I am not talking in the context of Beowulf clusters or anything else…..
I am talking more specifically w.r.t. OGSA, globus, SGE, LSF, PBS, Condor….etc and their way of handling job migrations and scheduling.
Based on my memory most of these grid systems were batch oriented. Since batch oriented-ness generally precludes low latency user interaction like the ones you see with web/internet applications. But since I am not completely knowledgeable about the wide spectrum of applications used in the grid area, I though there might be some instances of grid applications that might have such requirements.
You should definitely go back and look at e.g., Sprite and Plan 9.
Both did it quite well -- they were after all the actual OS doing the
work and so had all of the information/hooks/etc. to do that.
As with many things, the biggest factor was that the (relatively
inexpensive) hardware just wasn't as powerful back then and so running
lots of jobs concurrently really impacted the local/other user of a
machine.
VMWare, for example, partly grew out of the desire to bring a lot of
the cool and powerful capabilities discovered in Sprite to the masses
and for general X (client) on Y (host) combinations.
Take care,
John
There's a couple of workload distribution models, depending on the nature of the application. If the application is low-overhead when idle, then you just run instances of the application on all nodes in the grid, and it just doesn't use a significant amount of resources when there's no work to be done. In other scenarios, say if an app preallocates a significant amount of RAM for its own nefarious purposes on startup, then the scheduler will look at the current workload, see that there's needs for additional horsepower, and only then fire up instances of the app on additional servers.
I think it's important that you not unnecessarily conflate "cluster" with "grid". On a traditional grid environment with plain vanilla apps, the failure of a node is handled by another node getting assigned that one's workload. It is not uncommon that the failure event require a restart from a checkpoint or from the beginning of a job, hence failures really are "data loss events" - it's just that you can start from scratch. For example, you might have a batch job to convert 200,000 word documents to PDFs, and 100 servers. Each server gets 2000 items to convert. You can either have checkpointing after every conversion, after a set of conversions, or no checkpointing. If node 46 fails after document 1587, the scheduler will add the appropriate number of conversions to the queues of the surviving nodes, or by adding another node.
Generally, the reason people partition their grids are business/compliance/security/administrative, rather than technical. One business unit is concerned with sharing the same OS images as another business unit, or they can't agree on the scheduling priorities, or chargeback, etc.
Incidentally, you see the same problems with virtualization, in terms of sharing resources - nice to know that some problems remain constant.
Thanks,
Matt
--
Matthew Zito
Chief Scientist
GridApp Systems
P: 646-452-4090
mz...@gridapp.com
http://www.gridapp.com
Matt, thanks for jumping in … permit me to add a few more points:
Realizing I run the risk of rekindling a definition debate far older than “what is a cloud”, it is important to reiterate Matt’s point that grids are not necessarily clusters. Clusters can be part of the resource pool for grids (makes sense for optimization purposes) but TYPICALLY when you talk about clusters it’s a pool of identical hardware resources whereas when you talk about grids you’re talking about the software layer that controls the execution of work across that pool. There is no requirement for all nodes to be identical in a grid environment; the intelligence that controls workload distribution just needs to be aware of the attributes of that resource. In that manner if you understand the requirements of the workload (data affinities, must complete by, relative priority, perquisites, etc) and you understand the available resources you can dynamically allocate work to the resource that can best complete the work at that point in time.
This goes to your question below – if something fails, the work can be
restarted elsewhere but the work that was underway on that node must start over
from scratch. Matt references checkpointing; if you have jobs that
are going to take a long time to complete that makes sense, but if you have a
bunch of short-lived tasks it’s not worth the delay (while results are
written) to have a checkpoint. Of course there are other tricks that my
buddies selling Coherence (or similar products from GigaSpaces, Gemstone, etc)
can teach you to mitigate that delay. For long-running services as I
mentioned previously your guess is correct – typically the ‘intelligence’
will spawn a new instance of that service on another node and it will take over
the work. Best practices for deployment of those types of services is to always
have at least 2 instances running, so in general a failure is about as
noticeable as what a user would experience with a hypervisor-based live
migration.
Now, before Jan and others jump on me … true cluster systems (IBM HACMP, etc) handle failures at the hardware level … none of this icky software in the way. A failure of a node is 100% transparent to the end user. But you will pay a lot for that level of availability, so I’ll close this the same way as my previous post … use the right tool (architecture) for the right situation.
Jim
From: Kevin Apte
[mailto:technicalar...@gmail.com]
Sent: Tuesday, April 14, 2009 11:46 AM
To: cloud-c...@googlegroups.com
Subject: [ Cloud Computing ] Re: Cloud Computing and Multi-tenancy
Virtualization using VMWare or Xen allows isolation of system resources between different Virtual Machines. JVMs run in the same OS, and can potentially impact each other by causing crashes at the kernel level, causing each other to get starved of system resources like Memory, CPU, File Handles, Network bandwidth etc.
Kevin
On Mon, Apr 13, 2009 at 6:47 PM, John D. Mitchell <jdmit...@gmail.com> wrote:
On Apr 13, 2009, at 11:54 , Christopher Steel wrote:
[...]
> You can avoid naming
issues (and should do so) using different class
> loaders
> within the same VM. Granted this is not as straightforward as you
> would
> expect it to be, but it is not rocket science ether.
Yes and no (I've written a few articles about it somewhere
:-). There
are plenty of nasty problems in (over-)retention when one tries to get
rid of old versions (when, for instance loading new versions). Trying
to robustly do "multi-tenants" in a single JVM is asking for
trouble...
We have had a lot of success with a custom classloader that handled versioning without trouble. I recall that there were a significant amount of initial hurdles, but we have not had any troubles since.
> I agree that the GC is
> a large performance consideration, it always has been.
It's not just performance. In a multi-tenant
situation, a badly
behaving tenant can easily destroy all of the utility for all of the
tenants just by being a bad citizen w.r.t. to GC.
That’s very true, but it is no different than a run-away process hogging CPU. And since most VM installations out there do not have assigned CPUs, a run-away process in one VM can effect processes in other VMs on the same box/blade.
> On the positive side,
> Java offers a rigorous security model that makes it a serious
> contender in
> this space.
Yes and no. There is all of the help in terms of
things like
references but by the time one takes care of all of the various
issues, you're basically right back to separate instances of the JVM.
Of course, there are lots of security issues that people don't always
(know enough to) care about YMMV (such as timing attacks and eating up
randomness).
I am not sure which timing attacks are specific to the Java Security model, and I do agree you need a lot of work to take care of the various issues, but I disagree that you are back to separate instances of the VM.
> I am not sure what you meant you meant in regards to the perm-gen
> space
> (perhaps that it is shared)?
Perm-gen space is indeed shared on a per-instance of the JVM
basis and
it's a fixed size. There was one simple bug in a library that was
required by a library used by a framework that one of our contractors
used that ate perm-gen space and it ended up taking forever to track
down (for a variety of reasons including crappy tools and crappy
people). Classloader issues have also come up that can eat perm-gen
space.
Anybody can create bad code that eats up memory whether in a VM or in an OS instance. With Java, you have to have an understanding of the heap space, how it is allocated and what the memory requirements are of the applications that will run within a VM. This is no different than understanding the memory requirements when sizing a VM or even a box with a single OS instance.
At the end of the day, I still believe the JVM provides a significant resource cost savings over an OS hosted VM instance.
-Chris
Have fun,
John