Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Glassfish Open Source Edition v3.1.1 on a Ubuntu 12.04 Micro Instance in Amazon EC2 (Elastic Compute Cloud). I've configured a single domain with a single application. When I start the domain with time asadmin start-domain, it reports back with the following:

Waiting for domain1 to start ............................
Command start-domain executed successfully.
real    2m6.599s

Two minutes... What takes two minutes? Is there any way I can speed up the process or should I just go for other solutions like Tomcat or Jetty for my application server? When restarting Glassfish on my local Windows 8 client computer, it takes seconds, not minutes. Although I realize my computer has more hardware, it shouldn't take two minutes to start a simple application server.

I've tried adding the following two JVM-OPTIONS to the domain config file as recommended by in other discussions, to no avail: and

update: After doing two launches with --verbose, this is an edited comparison of two interesting segments:

Run #1

[#|2013-03-15T11:32:48.597+0000| Created virtual server [__asadmin]|#]
[#|2013-03-15T11:33:12.244+0000| Virtual server [server] loaded default web module    []|#]
[#|2013-03-15T11:33:15.973+0000| Scanning for root resource and provider classes in the packages:

Run #2

[#|2013-03-15T11:36:10.707+0000| Created virtual server [__asadmin]|#]
[#|2013-03-15T11:36:25.127+0000| Virtual server [server] loaded default web module []|#]
[#|2013-03-15T11:37:37.198+0000| Scanning for root resource and provider classes in the packages:

Full log of run#2 at pastbin here

What's intersting to note is the vast difference in time between line two and three in the two runs. (3 secs vs 1 min+)

I can also add that while the server is launching, console response is very slow in a second SSH window - to the point where ls takes seconds to respond.

edit 2 Free-output after service launch:

              total       used       free     shared    buffers     cached
 Mem:        604376     469776     134600          0       8976      78212
 -/+ buffers/cache:     382588     221788
 Swap:            0          0          0
share|improve this question
Run it with --verbose to see what it's doing. – Michael Hampton Mar 15 '13 at 11:18
up vote 2 down vote accepted

Note that a micro instance is:

  • very limited in term of CPU & it use the concept of burstable allocation. The exact description is : Up to 2 EC2 Compute Units (for short periodic bursts).

  • very limited in term of memory (613MB). Make sure Glassfish doesn't try to over allocate as you'll swap to disk and this get heavily penalized in AWS EC2.

Pretty sure you are hitting one of those 2...

share|improve this answer
I'm starting to believe you're right. I'd appreciate if you looked at my update in the question and say if your suspicion is changed after this? – Nilzor Mar 15 '13 at 11:49
Can you post the 'free' command output after starting the service ? Because Ubuntu footprint is normally a lot bigger than the 100MB that are left available after you start glassfish (which would mean you start swapping - explaining the low interactivity of your terminal). – CloudWeavers Mar 15 '13 at 12:01
done (see question) – Nilzor Mar 15 '13 at 12:10
Then issue really seems to be with the CPU. You are trying to drive it for too long (starting the system, you try bursting for a little while). Your current instance type clearly doesn't support your workload. – CloudWeavers Mar 15 '13 at 12:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.