users@glassfish.java.net

Re: Glassfish v3 in very small scale (memory and cpu)

From: Burak Oguz <burak.oguz_at_gmail.com>
Date: Thu, 9 Jul 2009 17:14:24 +0300

Hi Alexis,

A few weeks ago I have asked about performance tuning in the post "Glassfish
v3 in very small scale (memory and cpu)". You have said that you are running
an ejb/jersey application around 30-40 mbs. I wonder that can you send your
optimizations in domain.xml?

My application contains ejb/jpa/jta/jersey with about 160 classes. And only
the application consumes around 100mbs. I have changed my ejbs to local
scope and jpa caches to very small sizes but these modifications did not
affect anything. GF totally consumes around 200mbs on startup.

Any help will be greatly appreciated because we are unable to reduce memory
consumption. Our domain.xml is attached.

Thanks

On Mon, Jun 22, 2009 at 1:15 PM, Burak Oguz <burak.oguz_at_gmail.com> wrote:

> I am talking about the resident size.. It hits to 200mb and I want to use
> it about max around 100mb because max user is about 5-10.
>
> The largest scoped application is using JTA,JPA,EJB and Jersey... Any
> performance tweaks will be useful too because when I set maxpermsize and xmx
> to around 128mb it does not have any effect..
>
> Thanks again..
>
>
> On Fri, Jun 19, 2009 at 6:00 PM, John Clingan <John.Clingan_at_sun.com>wrote:
>
>> Are you both measuring resident set size?
>>
>> Sent from my iPhone
>>
>>
>> On Jun 19, 2009, at 2:21 AM, Alexis Moussine-Pouchkine <alexis.mp_at_sun.com>
>> wrote:
>>
>> Thanks for the update. I did a little bit more testing and here's an
>>> updated list of the modules I used (the initial one was missing at least EJB
>>> support):
>>>
>>> NAME (PUBLISHER) VERSION STATE
>>> UFIX
>>> felix 1.8.0-0 installed
>>> ----
>>> glassfish-amx 3.0-51 installed
>>> ----
>>> glassfish-common 3.0-51 installed
>>> ----
>>> glassfish-corba-omgapi 3.0.0-20 installed
>>> ----
>>> glassfish-ejb-lite 3.0-51 installed
>>> ----
>>> glassfish-grizzly 1.9.15-0 installed
>>> ----
>>> glassfish-hk2 3.0-51 installed
>>> ----
>>> glassfish-jca 3.0-51 installed
>>> ----
>>> glassfish-jsf 2.0.0-13 installed
>>> ----
>>> glassfish-jta 3.0-51 installed
>>> ----
>>> glassfish-management 3.0-51 installed
>>> ----
>>> glassfish-nucleus 3.0-51 installed
>>> ----
>>> glassfish-web 3.0-51 installed
>>> ----
>>> jersey 1.1.0-1.0 installed
>>> ----
>>>
>>> There's a bug that requires glassfish-jca to be installed but that
>>> shouldn't make a big difference, memory-wise.
>>> The sample jersey-ejb application I used (admittedly smaller than your
>>> app and also not using JDBC/JPA) has the appserver run using between
>>> 30-40MB.
>>>
>>> cheers,
>>> -Alexis
>>>
>>> On Jun 18, 2009, at 23:32, Burak Oguz wrote:
>>>
>>> Hi Alexis,
>>>>
>>>> Thanks for your response. I will try your configuration. We are running
>>>> a single instance of glassfish with an average size ejb/jersey/jta
>>>> application and our memory consumption is about 200-300mb. It is far too
>>>> much for our UTM machine. I will reply again after trying your
>>>> configuration.
>>>>
>>>> Thanks..
>>>>
>>>> -- Burak
>>>> On Thu, Jun 18, 2009 at 6:34 PM, Alexis Moussine-Pouchkine <alexis.mp@
>>>> sun.com> wrote:
>>>> Hello Burak,
>>>>
>>>> From your list below you can certainly remove a few packages but the
>>>> dependencies are still a bit brittle so be careful how you do that.
>>>> I'm not sure I understand your memory requirement though. How many
>>>> instances of GlassFish do you intend to run in a 512MB environment?
>>>> With the following config and a simple ejb/jersey app deployed, I barely
>>>> reach 30MB (according to jconsole) :
>>>>
>>>> $ bin/pkg list
>>>> NAME (PUBLISHER) VERSION STATE
>>>> UFIX
>>>> felix 1.8.0-0 installed
>>>> ----
>>>> glassfish-amx 3.0-51 installed
>>>> ----
>>>> glassfish-common 3.0-51 installed
>>>> ----
>>>> glassfish-corba-omgapi 3.0.0-20 installed
>>>> ----
>>>> glassfish-grizzly 1.9.15-0 installed
>>>> ----
>>>> glassfish-hk2 3.0-51 installed
>>>> ----
>>>>
>>>> glassfish-jsf 2.0.0-13 installed
>>>> ----
>>>> glassfish-jta 3.0-51 installed
>>>> ----
>>>> glassfish-management 3.0-51 installed
>>>> ----
>>>> glassfish-nucleus 3.0-51 installed
>>>> ----
>>>> glassfish-web 3.0-51 installed
>>>> ----
>>>>
>>>> jersey 1.1.0-1.0 installed
>>>> ----
>>>>
>>>> Note you're using fairly old version of v3, the most current promoted
>>>> build is 51.
>>>> You should probably at least use the Preview version from JavaOne:
>>>> https://glassfish.dev.java.net/downloads/v3-preview.html
>>>>
>>>> cheers,
>>>> -Alexis
>>>>
>>>>
>>>> On Jun 17, 2009, at 16:52, Burak Oguz wrote:
>>>>
>>>> I wonder that is there a way to run Glassfish v3 with small memory
>>>> footprint devices like 512mb devices with performance? In 512mb
>>>> devices we will have really small amount of users to serve. We are
>>>> using EJB and Jersey modules.
>>>>
>>>> I have tried many tricks on domain.xml like decreasing pool numbers
>>>> and closing unnecessary services and ports. Currently installed
>>>> packages are:
>>>>
>>>> NAME (AUTHORITY) VERSION STATE
>>>> UFIX
>>>> felix 1.2.2-0 installed
>>>> ----
>>>> glassfish-amx 3.0-28.4 installed
>>>> ----
>>>> glassfish-api 3.0-28.4 installed
>>>> ----
>>>> glassfish-common 3.0-28.4 installed
>>>> ----
>>>> glassfish-corba-omgapi 3.0.0-1 installed
>>>> ----
>>>> glassfish-ejb 3.0-28.4 installed
>>>> ----
>>>> glassfish-grizzly 1.8.6.2-0 installed
>>>> ----
>>>> glassfish-hk2 3.0-28.4 installed
>>>> ----
>>>> glassfish-jca 3.0-28.4 installed
>>>> ----
>>>> glassfish-jdbc 3.0-28.4 installed
>>>> ----
>>>> glassfish-jdbc-management 3.0-28.4 installed
>>>> ----
>>>> glassfish-jpa 3.0-28.4 installed
>>>> ----
>>>> glassfish-jsf 2.0.0-13 installed
>>>> ----
>>>> glassfish-jta 3.0-28.4 installed
>>>> ----
>>>> glassfish-jts 3.0-28.4 installed
>>>> ----
>>>> glassfish-management 3.0-28.4 installed
>>>> ----
>>>> glassfish-nucleus 3.0-28.4 installed
>>>> ----
>>>> glassfish-web 3.0-28.4 installed
>>>> ----
>>>> glassfish-web-management 3.0-28.4 installed
>>>> ----
>>>> jersey 1.1.0-1.0 installed
>>>> ----
>>>> metro 1.4-5010 installed
>>>> ----
>>>> pkg 1.0.7-15.1269 installed
>>>> ----
>>>> pkg-java 1.0.7-15.1269 installed
>>>> ----
>>>> python2.4-minimal 2.4.4.0-15.1269 installed
>>>> ----
>>>>
>>>> What should I do in order to run Glassfish in a very small scale?
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>