472,791 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

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 5140
|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
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
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
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
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
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
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
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
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
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.