Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 24375 invoked from network); 26 Feb 2009 03:07:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2009 03:07:03 -0000 Received: (qmail 42811 invoked by uid 500); 26 Feb 2009 03:06:56 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 42776 invoked by uid 500); 26 Feb 2009 03:06:56 -0000 Mailing-List: contact core-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-user@hadoop.apache.org Delivered-To: mailing list core-user@hadoop.apache.org Received: (qmail 42765 invoked by uid 99); 26 Feb 2009 03:06:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2009 19:06:56 -0800 X-ASF-Spam-Status: No, hits=3.6 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.44.30] (HELO yx-out-2324.google.com) (74.125.44.30) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2009 03:06:48 +0000 Received: by yx-out-2324.google.com with SMTP id 8so238490yxb.29 for ; Wed, 25 Feb 2009 19:06:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.16.74 with SMTP id n10mr1225673iba.44.1235617587004; Wed, 25 Feb 2009 19:06:27 -0800 (PST) In-Reply-To: <22215608.post@talk.nabble.com> References: <22215608.post@talk.nabble.com> Date: Wed, 25 Feb 2009 19:06:26 -0800 Message-ID: Subject: Re: Could not reserve enough space for heap in JVM From: Matei Zaharia To: core-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=000325574d7a5a06f10463c9a3da X-Virus-Checked: Checked by ClamAV on apache.org --000325574d7a5a06f10463c9a3da Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit These variables have to be at runtime through a config file, not at compile time. You can set them in hadoop-env.sh: Uncomment the line with export HADOOP_HEAPSIZE= to set the heap size for all Hadoop processes, or change options for specific commands. Now these commands are for the Hadoop processes themselves, but if you are getting the error in tasks you're running, you can set these in your hadoop-site.xml through the mapred.child.java.opts variable, as follows: mapred.child.java.opts -Xmx512m By the way I'm not sure if -J-Xmx is the right syntax; I've always seen -Xmx and -Xms. On Wed, Feb 25, 2009 at 5:05 PM, madhuri72 wrote: > > Hi, > > I'm trying to run hadoop version 19 on ubuntu with java build 1.6.0_11-b03. > I'm getting the following error: > > Error occurred during initialization of VM > Could not reserve enough space for object heap > Could not create the Java virtual machine. > make: *** [run] Error 1 > > I searched the forums and found some advice on setting the VM's memory via > the javac options > > -J-Xmx512m or -J-Xms256m > > I have tried this with various sizes between 128 and 1024 MB. I am adding > this tag when I compile the source. This isn't working for me, and > allocating 1 GB of memory is a lot for the machine I'm using. Is there > some > way to make this work with hadoop? Is there somewhere else I can set the > heap memory? > > Thanks. > > > > > > -- > View this message in context: > http://www.nabble.com/Could-not-reserve-enough-space-for-heap-in-JVM-tp22215608p22215608.html > Sent from the Hadoop core-user mailing list archive at Nabble.com. > > --000325574d7a5a06f10463c9a3da--