[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Gears and resources on the server



Thank you for your detail explanation. I didn't know that OpenShift uses cgroups. Now for me its all clear. 

I will ask you again definitely as I have already started building PoC.

regards
Marek

On 20 December 2012 19:55, Brenton Leanhardt <bleanhar redhat com> wrote:
+++ Marek Śmigielski [19/12/12 23:31 +0100]:

Hi,

I am interesting in using OpenShift Origin PaaS as a part of my product but
I am afraid about resources and performance of my servers. Is it true that
maximum ram allocation for all gears cannot excess overall physical ram of
the server? So if I have one server with 16Gb of free ram I can host only
32 512mb gears or 16 1024mb ones?

What about cpu cores? Can I host more gears than I have cores on the
server, if so is there any limit of how many gears can be  on quad core
server?

I think the best way to think about these questions is to do so in the
light of how a typical operating system works.  Most typical operating
systems allow for overcommitment of memory.  In Linux is this highly
tuneable.

More specific to OpenShift is the use of cgroups.  OpenShift uses
cgroups to make sure no gear uses more than its fair share of memory
on a node.  In Origin we ship a default configuration for limiting
gears but the expectation is that the admin will modify it to meet
their needs (see /etc/openshift/resource_limits.conf).

You'll likely find it extremely rare in practice for all gears to need
the full amount of memory at one time.  When you take things like gear
idling into account the gear densities can be _much_ higher.  A node
may have a few hundred gears on it but only a handful might be
receiving any load.  If a gear is idled it's basically only taking up
disk space.  If a requests comes in, OpenShift will start it back up.
Again, idling in OpenShift is tuneable.

For CPU cores, gears of a similar profile will all be alloted the same
about of cpu shares (as controlled by
/etc/openshift/resource_limits.conf).  Just like with memory, your
tolerance for overcommitment is specific to your use case.  There
will likely never be a 'one-size-fits-all' answer to the question of
'how many gears and I run on this machine?'.  The best thing to do is
monitor your systems, tweak a few knobs and then repeat.

Once you have a system up and running and understand your worklow I'm
sure we can give you more specific guidance.

--Brenton


I understand that one gear is dedicated to single user only, so two users
with their applications cannot share the same gear for better resources
usage?  Please correct me if I misunderstand something.

I would be grateful for your answers as I am quite new to PaaS concept and
I can't find detail explanation of physical resources usage by gears in
documentation.

regards,
Marek Smigielski

_______________________________________________
dev mailing list
dev lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]