VM warning: Insufficient space for shared memory file

While we were experimenting with MapReduce programs in our hadoop cluster, we started noticing following errors.

Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:
/tmp/hsperfdata_hdfs/28099
Try using the -Djava.io.tmpdir= option to select an alternate temp location.

Exception in thread "main" java.io.IOException: No space left on device
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:345)
at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:80)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:107)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:81)
at org.apache.hadoop.util.RunJar.run(RunJar.java:209)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

On first look it seemed as if disk is full, and that would be causing the jobs to fail.  Further analysis showed that /tmp directory was mounted with allocated space of just 300M.  Remounting the /tmp drive with 2GB space solved the problem.

sudo mount -o remount,size=2G /tmp
Advertisements

One thought on “VM warning: Insufficient space for shared memory file

  1. Hi..
    I tried using this “sudo mount -o remount,size=2G /tmp ” but the same error message obtains again and again when I run the command javac -version or java -version.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s