473,513 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java in small-memory virtualized Linux environment


I am trying to run the java VM in a virtual linux webserver environment
with WebCentral:
http://www.webcentral.com.au/docs/pr...inux%20Servers

When I invoke the java process, it fails with the output:
Error occurred during initialization of VM
Could not reserve enough space for object heap
The virtual server has 33MB of committed physical RAM, plus (in theory)
up to 12GB of virtual RAM and swap. The system is RH9:
Linux svc014 2.4.20-020stab009.21.777-enterprise #1 SMP Tue Jun 15 13:21:55 MSD 2004 i686 i686 i386 GNU/Linux

/proc/meminfo says:
total: used: free: shared: buffers: cached:
Mem: 4232482816 4178165760 54317056 0 920023040 954605568
Swap: 8586248192 69046272 8517201920
MemTotal: 4133284 kB
MemFree: 53044 kB
MemShared: 0 kB
Buffers: 898460 kB
Cached: 922252 kB
SwapCached: 9980 kB
Active: 929456 kB
Inactive: 1100100 kB
HighTotal: 556972 kB
HighFree: 47136 kB
LowTotal: 3576312 kB
LowFree: 5908 kB
SwapTotal: 8385008 kB
SwapFree: 8317580 kB

An strace shows the offending call to be:
old_mmap(NULL, 134217728, PROT_READ|PROT_WRITE|PROT_EXEC,

MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot
allocate memory)

this call is immediately followed by the write() calls to display the
error message. ulimits for memory are 'unlimited'.
So, the questions are:

1. Why is the process unable to allocate 128MB of memory given I should
have access to virtual memory?

2. Why is Java requesting 128MB of memory and how can I stop it? This
number doesn't change even with the -Xms, -Xmx and -Xss options.

3. Where does this 128MB figure come from and how can I change it?
I've tried Sun JRE1.4.2 as well as Blackdown JRE1.4.1 and 1.3.1, all
show the same problem.

I have also logged a job with WebCentral to see if they have encountered
the problem before. Any help or ideas are appreciated!
Thanks in advance,

Kieron Briggs
Web Admin, http://www.andrewwilkie.org.au/
Jul 17 '05 #1
3 5176
|When I invoke the java process, it fails with the output:
|
| > Error occurred during initialization of VM
| > Could not reserve enough space for object heap
|
|The virtual server has 33MB of committed physical RAM, plus (in theory)
|up to 12GB of virtual RAM and swap. The system is RH9:

I've found that current JVMs need a few hundred meg of memory to start.
33MB may not be enough. I don't know how the virtualised memory works on
webcentral. What's the significance of the 33 MB?
--
Jul 17 '05 #2
xa****@tvrksy.com wrote:
|When I invoke the java process, it fails with the output:
|
| > Error occurred during initialization of VM
| > Could not reserve enough space for object heap
|
|The virtual server has 33MB of committed physical RAM, plus (in theory)
|up to 12GB of virtual RAM and swap. The system is RH9:

I've found that current JVMs need a few hundred meg of memory to start.
33MB may not be enough. I don't know how the virtualised memory works on
webcentral. What's the significance of the 33 MB?


As I understand it (and I could be completely wrong I guess), my virtual
server is guarenteed to have 33MB of its memory mapped into actual
physical RAM at any one time, and may have up to 2GB mapped depending on
system resource availability ('burstable'). From the /proc/meminfo
output I believe that my virtual server has 4 GB of 'RAM', most of which
will actually be on the physical machine's swap...

Jul 17 '05 #3
Kieron Briggs wrote:

I am trying to run the java VM in a virtual linux webserver environment
with WebCentral:
http://www.webcentral.com.au/docs/products display.cgi?id=104&productCategory=Linux%20Servers

The price is outrageous.

I use www.linode.com & is by far the best offering, & it runs UML.
http://user-mode-linux.sourceforge.net/

When I invoke the java process, it fails with the output:
> Error occurred during initialization of VM
> Could not reserve enough space for object heap


The virtual server has 33MB of committed physical RAM, plus (in theory)
up to 12GB of virtual RAM and swap. The system is RH9:


I have no trouble running Java & Tomcat thru Linode.

gtoomey
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
4379
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
114
9692
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
25
3118
by: wee | last post by:
I've been using Java for a few years now and am just amazed at how many new "technologies" or tools come out all the time (i.e., Struts, Java Server Faces, JMeter, jad, etc.). It is nigh impossible...
8
355
by: Tim923 | last post by:
The code in C# looks very similiar to what I remember from Java, but we haven't done much manual coding yet. How similiar are they?
4
3713
by: Elhanan | last post by:
hi.. all a client of ours is considering to move from a dos application to windows desktop application. the application is for traveling agency, the database is rather large. their current...
2
6928
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
1
3115
by: Unebrion | last post by:
Alright im working on a program that prints out user imput in a frame, along with a barcode.. it is like the front of an envelope. Here is the description for the program. This...
12
1793
by: firehead.satish | last post by:
Hello All, I have seen a lot of forums that are fight over these 2 languages. Disadvantages 1) When a complete java application has been written and it has to be packaged then entire JRE...
63
4900
by: s0suk3 | last post by:
I've been programming Python for a couple of years now. Now I'm looking to move on to either C++ or Java, but I'm not sure which. Which one do you think will be a better transition for a Python...
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7543
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7106
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7534
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.