You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by James Gartner <Ja...@moodys.com> on 2012/04/13 19:08:38 UTC

Memory usage, and max number of bundles/services in a single container

Folks,
I've been asked by our architecture group to look into this question:
If we have a number of small services, and composite services that "wrap"
the small services in transactions, how many of these could we reasonably
put into a single container, and what memory sizes are we looking at.
Obviously the size of the bundles/etc. matter, how much memory you can
devote to the JVM for the container, etc,. but I was wondering if anyone has
any good rule of thumb or actual deployed system numbers that I could use as
a 'guesstimate" -  do you folks have tens of services, hundreds of services,
thousands/etc. deployed in one container?  Memory sizes/issues (like Virgo
has a know PermGen space issue - -does Karaf have any issues like that I
need to be aware of?)

The architecture they are looking at would be a number of small CRUD-like
services, some validation services, and then composite services layered on
top to provide the transactions across the CRUD services, and these all need
to sit inside the single OSGi container to do that.

Any ideas/help appreciated!

--
View this message in context: http://karaf.922171.n3.nabble.com/Memory-usage-and-max-number-of-bundles-services-in-a-single-container-tp3908529p3908529.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Memory usage, and max number of bundles/services in a single container

Posted by Reuben Garrett <re...@gmail.com>.
James,

I don't know a solid answer to your question - but as a starting point, I
believe there are unit-testing capabilities in Karaf that might support
experimentation along these lines.  I almost think the best way to address
this would be through brute-force benchmarks.  For example, a unit test
that generates a specified number of services (e.g. with random names) and
dispatches some number of requests to some or all of them - a kind of
load/soak testing [1].  Perhaps this already exists - I regret that I do
not know for certain.

If it does not already exist, and if you choose to follow this route and
are able to create a generic load test, I suspect it would make a good
addition to Karaf (as an optional benchmark test suite), and I would
encourage you to contribute the suite to the project for the benefit of
others with the same use-case.

[1]: http://en.wikipedia.org/wiki/Soak_testing

~ Reuben

On Fri, Apr 13, 2012 at 12:08, James Gartner <Ja...@moodys.com>wrote:

> Folks,
> I've been asked by our architecture group to look into this question:
> If we have a number of small services, and composite services that "wrap"
> the small services in transactions, how many of these could we reasonably
> put into a single container, and what memory sizes are we looking at.
> Obviously the size of the bundles/etc. matter, how much memory you can
> devote to the JVM for the container, etc,. but I was wondering if anyone
> has
> any good rule of thumb or actual deployed system numbers that I could use
> as
> a 'guesstimate" -  do you folks have tens of services, hundreds of
> services,
> thousands/etc. deployed in one container?  Memory sizes/issues (like Virgo
> has a know PermGen space issue - -does Karaf have any issues like that I
> need to be aware of?)
>
> The architecture they are looking at would be a number of small CRUD-like
> services, some validation services, and then composite services layered on
> top to provide the transactions across the CRUD services, and these all
> need
> to sit inside the single OSGi container to do that.
>
> Any ideas/help appreciated!
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Memory-usage-and-max-number-of-bundles-services-in-a-single-container-tp3908529p3908529.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Memory usage, and max number of bundles/services in a single container

Posted by Reuben Garrett <re...@gmail.com>.
James,

I don't know a solid answer to your question - but as a starting point, I
believe there are unit-testing capabilities in Karaf that might support
experimentation along these lines.  I almost think the best way to address
this would be through brute-force benchmarks.  For example, a unit test
that generates a specified number of services (e.g. with random names) and
dispatches some number of requests to some or all of them - a kind of
load/soak testing [1].  Perhaps this already exists - I regret that I do
not know for certain.

If it does not already exist, and if you choose to follow this route and
are able to create a generic load test, I suspect it would make a good
addition to Karaf (as an optional benchmark test suite), and I would
encourage you to contribute the suite to the project for the benefit of
others with the same use-case.

[1]: http://en.wikipedia.org/wiki/Soak_testing

~ Reuben

On Fri, Apr 13, 2012 at 12:08, James Gartner <Ja...@moodys.com>wrote:

> Folks,
> I've been asked by our architecture group to look into this question:
> If we have a number of small services, and composite services that "wrap"
> the small services in transactions, how many of these could we reasonably
> put into a single container, and what memory sizes are we looking at.
> Obviously the size of the bundles/etc. matter, how much memory you can
> devote to the JVM for the container, etc,. but I was wondering if anyone
> has
> any good rule of thumb or actual deployed system numbers that I could use
> as
> a 'guesstimate" -  do you folks have tens of services, hundreds of
> services,
> thousands/etc. deployed in one container?  Memory sizes/issues (like Virgo
> has a know PermGen space issue - -does Karaf have any issues like that I
> need to be aware of?)
>
> The architecture they are looking at would be a number of small CRUD-like
> services, some validation services, and then composite services layered on
> top to provide the transactions across the CRUD services, and these all
> need
> to sit inside the single OSGi container to do that.
>
> Any ideas/help appreciated!
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Memory-usage-and-max-number-of-bundles-services-in-a-single-container-tp3908529p3908529.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>