Check the overcommit VM settings on your kernel.  These prevent swap from being 
used on older JVMs, and cause out-of-memory errors to be given by Java even 
when there is free memory.

Brian

On May 2, 2011, at 11:51 AM, Steve Loughran wrote:

> On 29/04/2011 03:37, [email protected] wrote:
>> Hi guys, I have a very strange problem here, hope someone can help.
>> 
>> I have a virtual machine with 8 GB memory, the os is CentOS 5.5 x64 version; 
>> I got this VM from someone else (means they may have done some configuration 
>> on this VM)
>> I cannot start even 6 easiest jvm at the same time (for example, start the 
>> following java code simultaneously 6 times:
>> 
>> import java.io.IOException;
>> public class InputTest {
>>         public static void main(String[] args) throws IOException, 
>> InterruptedException {
>>                 int length = 0;
>>                 long sum=0;
>>                 do {
>>                         sum+=length++;
>>                         System.out.println("Current sum: "+ sum);
>>                         Thread.sleep(1000);
>> 
>>                 } while (length<1000000);
>> 
>>         }
>> }
>> 
>> 
>> Any one  have any comments?
> 
> 
> 1. check swap space
> 2. you work for a storage company, so get some more...

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to