You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Sander de Groot <s....@jdi.nl> on 2010/07/02 12:27:08 UTC

Limit of bundles and corresponding performance

Hi,

Our production environment consists of >= 500 websites and are currently 
all written in PHP. We're considering moving from PHP to Java but are 
unsure if its the right choice and if it is even possible with that many 
sites. (memory?)

At the moment we're considering to use Felix as the container for all 
applications. So Felix will have > 500 bundles. Each bundle (at least 
the webapps) will be around 100kb each. I'd like to know whether it is 
possible to have that many bundles deployed in Felix and would like to 
know more about the performance aspect.

So in short: is it possible to deploy ~ 500 bundles on one container and 
have the same or even better performance than the same server using PHP? 
Or do you have any other (better)  suggestions?

Regards,

Sander de Groot

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Limit of bundles and corresponding performance

Posted by Justin Edelson <ju...@gmail.com>.

On Jul 3, 2010, at 3:58 AM, Sander de Groot <s....@jdi.nl> wrote:

> On 07/02/2010 03:22 PM, Richard S. Hall wrote:
>> On 7/2/10 6:27, Sander de Groot wrote:
>>> Hi,
>>> 
>>> Our production environment consists of >= 500 websites and are currently all written in PHP. We're considering moving from PHP to Java but are unsure if its the right choice and if it is even possible with that many sites. (memory?)
>>> 
>>> At the moment we're considering to use Felix as the container for all applications. So Felix will have > 500 bundles. Each bundle (at least the webapps) will be around 100kb each. I'd like to know whether it is possible to have that many bundles deployed in Felix and would like to know more about the performance aspect.
>>> 
>>> So in short: is it possible to deploy ~ 500 bundles on one container and have the same or even better performance than the same server using PHP? Or do you have any other (better)  suggestions?
>> 
>> The biggest potential overhead that the Felix framework might add is startup overhead, but unless your bundles are extremely complex (i.e., lots of imports/exports needing to be resolved with potential conflicts), then this shouldn't be too significant. For example, the GlassFish app server is composed of over 200 bundles and still can start in around 2 to 3 seconds.
> Ah, yes, right. It's clear that the Felix framework won't be the problem in my case. The startup time is not very relevant since we're in a load-balanced environment.
>> 
>> There will also be some memory overhead to maintain the module metadata and class loader wiring, but this shouldn't be very significant. Once things get going, then it is pretty much just normal class loader delegation and object creation at that point.
> This is where my real question surfaces. Is Java able to handle large quantities of smaller and some larger web applications all within the same server?
This is a difficult, if not impossible question to answer in the abstract. Do you have a specific concern? You also might want to post this to the mailing list of your preferred servlet container.

I will caution you that vhosting makes monitoring and troubleshooting very difficult. But using Java isn't going to make this significantly worse than PHP.

Justin 

>> 
>> -> richard
>> 
>>> 
>>> Regards,
>>> 
>>> Sander de Groot
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Limit of bundles and corresponding performance

Posted by Sander de Groot <s....@jdi.nl>.
On 07/02/2010 03:22 PM, Richard S. Hall wrote:
> On 7/2/10 6:27, Sander de Groot wrote:
>> Hi,
>>
>> Our production environment consists of >= 500 websites and are 
>> currently all written in PHP. We're considering moving from PHP to 
>> Java but are unsure if its the right choice and if it is even 
>> possible with that many sites. (memory?)
>>
>> At the moment we're considering to use Felix as the container for all 
>> applications. So Felix will have > 500 bundles. Each bundle (at least 
>> the webapps) will be around 100kb each. I'd like to know whether it 
>> is possible to have that many bundles deployed in Felix and would 
>> like to know more about the performance aspect.
>>
>> So in short: is it possible to deploy ~ 500 bundles on one container 
>> and have the same or even better performance than the same server 
>> using PHP? Or do you have any other (better)  suggestions?
>
> The biggest potential overhead that the Felix framework might add is 
> startup overhead, but unless your bundles are extremely complex (i.e., 
> lots of imports/exports needing to be resolved with potential 
> conflicts), then this shouldn't be too significant. For example, the 
> GlassFish app server is composed of over 200 bundles and still can 
> start in around 2 to 3 seconds.
Ah, yes, right. It's clear that the Felix framework won't be the problem 
in my case. The startup time is not very relevant since we're in a 
load-balanced environment.
>
> There will also be some memory overhead to maintain the module 
> metadata and class loader wiring, but this shouldn't be very 
> significant. Once things get going, then it is pretty much just normal 
> class loader delegation and object creation at that point.
This is where my real question surfaces. Is Java able to handle large 
quantities of smaller and some larger web applications all within the 
same server?
>
> -> richard
>
>>
>> Regards,
>>
>> Sander de Groot
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Limit of bundles and corresponding performance

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 7/2/10 6:27, Sander de Groot wrote:
> Hi,
>
> Our production environment consists of >= 500 websites and are 
> currently all written in PHP. We're considering moving from PHP to 
> Java but are unsure if its the right choice and if it is even possible 
> with that many sites. (memory?)
>
> At the moment we're considering to use Felix as the container for all 
> applications. So Felix will have > 500 bundles. Each bundle (at least 
> the webapps) will be around 100kb each. I'd like to know whether it is 
> possible to have that many bundles deployed in Felix and would like to 
> know more about the performance aspect.
>
> So in short: is it possible to deploy ~ 500 bundles on one container 
> and have the same or even better performance than the same server 
> using PHP? Or do you have any other (better)  suggestions?

The biggest potential overhead that the Felix framework might add is 
startup overhead, but unless your bundles are extremely complex (i.e., 
lots of imports/exports needing to be resolved with potential 
conflicts), then this shouldn't be too significant. For example, the 
GlassFish app server is composed of over 200 bundles and still can start 
in around 2 to 3 seconds.

There will also be some memory overhead to maintain the module metadata 
and class loader wiring, but this shouldn't be very significant. Once 
things get going, then it is pretty much just normal class loader 
delegation and object creation at that point.

-> richard

>
> Regards,
>
> Sander de Groot
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Limit of bundles and corresponding performance

Posted by hapa li <kh...@gmail.com>.
What would be the reason for using Felix for hosting 500 sites? Try
some lightweight servlet container and go for groovy.

On Tue, Jul 6, 2010 at 6:18 AM, Will Budic <vi...@gmail.com> wrote:
> I am working on something similar. The architecture however separates to
> bundles to serve java libraries and static resources only.
> This is eventually what in the end you want. Since like that it server
> several thousand websites on a single server.
> Please find attached the diagram which you might find interesting. Even I am
> aware it doesn't help your case much.
> As the mentioned PML is current still under development and is far and over
> with any XML based implementations like PHP.
> On 2 July 2010 20:27, Sander de Groot <s....@jdi.nl> wrote:
>>
>> Hi,
>>
>> Our production environment consists of >= 500 websites and are currently
>> all written in PHP. We're considering moving from PHP to Java but are unsure
>> if its the right choice and if it is even possible with that many sites.
>> (memory?)
>>
>> At the moment we're considering to use Felix as the container for all
>> applications. So Felix will have > 500 bundles. Each bundle (at least the
>> webapps) will be around 100kb each. I'd like to know whether it is possible
>> to have that many bundles deployed in Felix and would like to know more
>> about the performance aspect.
>>
>> So in short: is it possible to deploy ~ 500 bundles on one container and
>> have the same or even better performance than the same server using PHP? Or
>> do you have any other (better)  suggestions?
>>
>> Regards,
>>
>> Sander de Groot
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Limit of bundles and corresponding performance

Posted by Will Budic <vi...@gmail.com>.
I am working on something similar. The architecture however separates to
bundles to serve java libraries and static resources only.
This is eventually what in the end you want. Since like that it server
several thousand websites on a single server.

Please find attached the diagram which you might find interesting. Even I am
aware it doesn't help your case much.
As the mentioned PML is current still under development and is far and over
with any XML based implementations like PHP.

On 2 July 2010 20:27, Sander de Groot <s....@jdi.nl> wrote:

> Hi,
>
> Our production environment consists of >= 500 websites and are currently
> all written in PHP. We're considering moving from PHP to Java but are unsure
> if its the right choice and if it is even possible with that many sites.
> (memory?)
>
> At the moment we're considering to use Felix as the container for all
> applications. So Felix will have > 500 bundles. Each bundle (at least the
> webapps) will be around 100kb each. I'd like to know whether it is possible
> to have that many bundles deployed in Felix and would like to know more
> about the performance aspect.
>
> So in short: is it possible to deploy ~ 500 bundles on one container and
> have the same or even better performance than the same server using PHP? Or
> do you have any other (better)  suggestions?
>
> Regards,
>
> Sander de Groot
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Limit of bundles and corresponding performance

Posted by Atle Prange <at...@gmail.com>.
I think the general answer to your question is, yes, java + felix can
handle your use case. And with my limited knowledge of php i also say
that it will probably run faster than php. But it depends on how you
implement your web applications of course. I would certainly give it a
try!

-atle


On Sat, 2010-07-03 at 09:54 +0200, Sander de Groot wrote:
> On 07/03/2010 12:21 AM, Guo Du wrote:
> > On Fri, Jul 2, 2010 at 12:22 PM, Sander de Groot<s....@jdi.nl>  wrote:
> >    
> >> Okay, I was expecting this question. The problem however is: I can't give
> >> you a definitive answer. Like I said: these bundles are actually just web
> >> applications (WAR) with a single point of entry (single servlet per-bundle).
> >>      
> > You may "think in java", a different multi-tenant package/architecture
> > could helps you solve the problem for now and future.
> >
> >    
> >> Actually, what's bothering me (at least, I think) is this:
> >>   To me Java Application servers are known to host really large
> >> (web)applications. As far as I know Java is most commonly used for the kind
> >> of applications for which you will be needing a whole server to run them.
> >> PHP on the other hand is more commonly used for smaller scale applications.
> >> Since we're switching to Java, I'm concerned that Java isn't designed to
> >> handle that many nor such small applications.
> >>      
> > Most of mordern languages can build internet scale web applications,
> > facebook is a good usage example of php. Java is a good  language to
> > build complex web applications :)
> >    
> Yes indeed they can. But in this case, Java is supposed to run hundreds 
> of small to large applications. So in fact we're not talking about 
> complex web applications but about simple web applications but very 
> large in quantity.
> > -Guo
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
> >    
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Limit of bundles and corresponding performance

Posted by Sander de Groot <s....@jdi.nl>.
On 07/03/2010 12:21 AM, Guo Du wrote:
> On Fri, Jul 2, 2010 at 12:22 PM, Sander de Groot<s....@jdi.nl>  wrote:
>    
>> Okay, I was expecting this question. The problem however is: I can't give
>> you a definitive answer. Like I said: these bundles are actually just web
>> applications (WAR) with a single point of entry (single servlet per-bundle).
>>      
> You may "think in java", a different multi-tenant package/architecture
> could helps you solve the problem for now and future.
>
>    
>> Actually, what's bothering me (at least, I think) is this:
>>   To me Java Application servers are known to host really large
>> (web)applications. As far as I know Java is most commonly used for the kind
>> of applications for which you will be needing a whole server to run them.
>> PHP on the other hand is more commonly used for smaller scale applications.
>> Since we're switching to Java, I'm concerned that Java isn't designed to
>> handle that many nor such small applications.
>>      
> Most of mordern languages can build internet scale web applications,
> facebook is a good usage example of php. Java is a good  language to
> build complex web applications :)
>    
Yes indeed they can. But in this case, Java is supposed to run hundreds 
of small to large applications. So in fact we're not talking about 
complex web applications but about simple web applications but very 
large in quantity.
> -Guo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>    


-- 
*Sander de Groot*
Webdevelopment

*JDI internet professionals*
Zutphensestraatweg 85
6953 CJ Dieren
www.jdi.nl <http://www.jdi.nl>

T (0313) 496 741
F (0313) 420 996
M 06 2325 2066 /(Belangrijke zaken)/
s.degroot@jdi.nl <ma...@jdi.nl>

*Interesse in werken bij JDI?*
http://www.jdi.nl/vacatures/

Re: Limit of bundles and corresponding performance

Posted by Guo Du <mr...@duguo.org>.
On Fri, Jul 2, 2010 at 12:22 PM, Sander de Groot <s....@jdi.nl> wrote:
> Okay, I was expecting this question. The problem however is: I can't give
> you a definitive answer. Like I said: these bundles are actually just web
> applications (WAR) with a single point of entry (single servlet per-bundle).
You may "think in java", a different multi-tenant package/architecture
could helps you solve the problem for now and future.

> Actually, what's bothering me (at least, I think) is this:
>  To me Java Application servers are known to host really large
> (web)applications. As far as I know Java is most commonly used for the kind
> of applications for which you will be needing a whole server to run them.
> PHP on the other hand is more commonly used for smaller scale applications.
> Since we're switching to Java, I'm concerned that Java isn't designed to
> handle that many nor such small applications.
Most of mordern languages can build internet scale web applications,
facebook is a good usage example of php. Java is a good  language to
build complex web applications :)

-Guo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Limit of bundles and corresponding performance

Posted by Sander de Groot <s....@jdi.nl>.
Hi Marcel,

Thanks for your reply.

On 07/02/2010 12:58 PM, Marcel Offermans wrote:
> Hello Sander,
>
> On Jul 2, 2010, at 12:27 , Sander de Groot wrote:
>
>    
>> Our production environment consists of>= 500 websites and are currently all written in PHP. We're considering moving from PHP to Java but are unsure if its the right choice and if it is even possible with that many sites. (memory?)
>>
>> At the moment we're considering to use Felix as the container for all applications. So Felix will have>  500 bundles. Each bundle (at least the webapps) will be around 100kb each. I'd like to know whether it is possible to have that many bundles deployed in Felix and would like to know more about the performance aspect.
>>
>> So in short: is it possible to deploy ~ 500 bundles on one container and have the same or even better performance than the same server using PHP? Or do you have any other (better)  suggestions?
>>      
> Deploying hundreds of bundles in a single container is no problem, the framework can handle that. However, all other questions about performance are impossible to answer without a lot more information. The most important thing to realize is that the OSGi framework itself adds very little overhead, so the main question is what these 500 bundles will be doing?
>    
Okay, I was expecting this question. The problem however is: I can't 
give you a definitive answer. Like I said: these bundles are actually 
just web applications (WAR) with a single point of entry (single servlet 
per-bundle).

We've got many small websites (just images, files, some dynamic content 
and of course a CMS for the customer). Also we've got a few somewhat 
bigger sites which have more requests per second (I don't have any 
numbers atm) and relatively more content and finally we've got a few 
webapplications ~ 10 which are categorized as large (and again, 
relatively, I can only speak for the applications within our company). 
An example: a webstore for the company Nomad, a webapplication for a 
relatively large but local newspaper etc.

At peak we probably got 250 requests per second. It's no problem to 
load-balance so the amount of requests per second should not matter. 
What does matter to me is loading tons of applications into one VM. I've 
got few experience with java server technology and therefore have no 
clue on these topics.

To answer your question: the main goal of the bundles is to handle HTTP 
requests. Within handling these requests there is a variety of actions 
like: retrieval of data, security, content management etc. One important 
note is that the bundles won't serve static files.

Actually, what's bothering me (at least, I think) is this:
  To me Java Application servers are known to host really large 
(web)applications. As far as I know Java is most commonly used for the 
kind of applications for which you will be needing a whole server to run 
them. PHP on the other hand is more commonly used for smaller scale 
applications. Since we're switching to Java, I'm concerned that Java 
isn't designed to handle that many nor such small applications.

So therefore my question is: can Java compete to PHP on these scales?

I'm sorry if I haven't given you enough information, If there is 
anything specific then I'd gladly supply the information.
> Greetings, Marcel
>    

Regards,

Sander
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>    


-- 
*Sander de Groot*
Webdevelopment

*JDI internet professionals*
Zutphensestraatweg 85
6953 CJ Dieren
www.jdi.nl <http://www.jdi.nl>

T (0313) 496 741
F (0313) 420 996
M 06 2325 2066 /(Belangrijke zaken)/
s.degroot@jdi.nl <ma...@jdi.nl>

*Interesse in werken bij JDI?*
http://www.jdi.nl/vacatures/

Re: Limit of bundles and corresponding performance

Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Sander,

On Jul 2, 2010, at 12:27 , Sander de Groot wrote:

> Our production environment consists of >= 500 websites and are currently all written in PHP. We're considering moving from PHP to Java but are unsure if its the right choice and if it is even possible with that many sites. (memory?)
> 
> At the moment we're considering to use Felix as the container for all applications. So Felix will have > 500 bundles. Each bundle (at least the webapps) will be around 100kb each. I'd like to know whether it is possible to have that many bundles deployed in Felix and would like to know more about the performance aspect.
> 
> So in short: is it possible to deploy ~ 500 bundles on one container and have the same or even better performance than the same server using PHP? Or do you have any other (better)  suggestions?

Deploying hundreds of bundles in a single container is no problem, the framework can handle that. However, all other questions about performance are impossible to answer without a lot more information. The most important thing to realize is that the OSGi framework itself adds very little overhead, so the main question is what these 500 bundles will be doing?

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org