# Is hsperfdata file critical?

**URL:** <https://discuss.elastic.co/t/is-hsperfdata-file-critical/44586>\
**Category:** Elasticsearch\
**Created:** [March 16, 2016, 4:06pm UTC](https://discuss.elastic.co/t/is-hsperfdata-file-critical/44586 "2016-03-16T16:06:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![doremon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doremon/32/7837_2.png) [@doremon](https://discuss.elastic.co/u/doremon)\
**Post date:** [March 16, 2016, 4:06pm UTC](https://discuss.elastic.co/t/is-hsperfdata-file-critical/44586/1 "2016-03-16T16:06:10Z")

</div>

Hi,

Recently I started getting /tmp directory full error although it's not an individual partition.

```
root@ubuntu:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.9G 4.0K 7.9G 1% /dev
tmpfs 1.6G 700K 1.6G 1% /run
/dev/mapper/ubuntu--vg-root 38G 22G 14G 62% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
**overflow 1.0M 1.0M 0 100% /tmp**
/dev/sda1 236M 44M 180M 20% /boot

```

There were some files named "hsperfdata\_elasticsearch", "hsperfdata\_root" and "hsperfdata\_logstash". I checked their size but it was zero.

```
root@ubuntu:~# du -sh /tmp/*
32K	/tmp/hsperfdata_elasticsearch
0	/tmp/hsperfdata_logstash
0	/tmp/hsperfdata_root
0	/tmp/jna--1985354563
884K	/tmp/mkinitramfs_jf2yUF
0	/tmp/mkinitramfs-OL_uoE6Jd

```

I did a graceful system reboot and the issue got fixed.

I know that hsperfdata files are generated by Java but are they kinda critical for ELK stack operations? Why would it cause /tmp to go into overflow state in df command output?

---

<div class="post-metadata">

**Author:** ![rameshmimit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshmimit/32/7902_2.png) [@rameshmimit](https://discuss.elastic.co/u/rameshmimit)\
**Post date:** [March 21, 2016, 5:22am UTC](https://discuss.elastic.co/t/is-hsperfdata-file-critical/44586/2 "2016-03-21T05:22:34Z")

</div>

Hey Doremon,

Would you be able to find any answers on this? I am also facing the same issue. Because of this all the queries on elasticsearch are failing. I had to restart the elasticsearch service to fix this.

I want to understand, if I can set a cronjob to clean this file after couple of days, would that have any ill impact on cluster?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 21, 2016, 8:02am UTC](https://discuss.elastic.co/t/is-hsperfdata-file-critical/44586/3 "2016-03-21T08:02:00Z")

</div>

Hey,

I am confused, how can `df` show `/tmp` but is not in individual partition? Are you sure you did not add `/tmp` as a ramdisk? If so, 1 megabyte is really small. I just checked on an old Ubuntu LTS installation and that one looks fine.

If you check the `/tmp` contents, then a file size of 32kb should not really be a problem compared to the initramfs size of the other file, buts lets leave it as is.

The `hsperfdata` file is needed for tools like jstat to do some analysis and regurlarly updated by the JVM. A couple of workarounds:

- Change the `java.io.tmpdir` path via a system property and point it to another directory without space issues
- Disable gathering those stats via a JVM option called `-XX:-UsePerfData`
- There is another option mentioned in this [lengthy but awesome blog post](http://www.evanjones.ca/jvm-mmap-pause.html), how this feature turned out to be a performance issue, you should take the time to read it, it is really interesting
- Have a bigger `/tmp` dir, as there might be a fair share of other applications trying to write into it and fail, which might lead to processes exiting, check your logfiles

--Alex

---

<div class="post-metadata">

**Author:** ![doremon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doremon/32/7837_2.png) [@doremon](https://discuss.elastic.co/u/doremon)\
**Post date:** [March 21, 2016, 5:26pm UTC](https://discuss.elastic.co/t/is-hsperfdata-file-critical/44586/4 "2016-03-21T17:26:32Z")

</div>

> [@spinscale](#):
>
> he hsperfdata file is needed for tools like jstat to do some analysis and regurlarly updated by the JVM. A couple of workarounds:

As I mentioned I did a graceful restart os system and the issue went away. Also df wasn't showing /tmp as a partition anymore.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:06pm UTC](https://discuss.elastic.co/t/is-hsperfdata-file-critical/44586/5 "2017-07-05T23:06:29Z")

</div>


