# Question about tmpfs

**URL:** <https://www.ruby-forum.com/t/question-about-tmpfs/244535>\
**Category:** NGINX\
**Created:** [April 28, 2016, 11:48am UTC](https://www.ruby-forum.com/t/question-about-tmpfs/244535 "2016-04-28T11:48:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [April 28, 2016, 11:48am UTC](https://www.ruby-forum.com/t/question-about-tmpfs/244535/1 "2016-04-28T11:48:06Z")

</div>

Hello,

I have a question about tmpfs.

On my raspberry pi I with only 256 MB RAM df looks like.

root@pi:~# df -h  
Filesystem Size Used Avail Use% Mounted on  
/dev/root 15G 2.0G 13G 14% /  
devtmpfs 111M 0 111M 0% /dev  
tmpfs 115M 0 115M 0% /dev/shm  
tmpfs 115M 13M 102M 11% /run  
tmpfs 5.0M 4.0K 5.0M 1% /run/lock  
tmpfs 115M 0 115M 0% /sys/fs/cgroup  
/dev/mmcblk0p1 56M 20M 37M 36% /boot  
tmpfs 23M 0 23M 0% /run/user/33  
tmpfs 23M 0 23M 0% /run/user/0

Is tmpfs “overload”?  
What happens when a add a new tmpfs partition e.g for squid?

Is there a way to manipulate the size of the “default” tmpfs shown  
above? In /etc/fstab I cant found anything about tmpfs.

root@pi:~# cat /etc/fstab  
proc /proc proc defaults 0 0  
/dev/mmcblk0p1 /boot vfat defaults 0 2  
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1

# a swapfile is not a swap partition, no line here

# use dphys-swapfile swap[on|off] for that

root@pi:~#

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 28, 2016, 6:34pm UTC](https://www.ruby-forum.com/t/question-about-tmpfs/244535/2 "2016-04-28T18:34:41Z")

</div>

Hi,

This is probably not related to Nginx, you might want to visit Linux  
forums or lists for more detailed information. However, having tmpfs  
mounted at those directories is a normal mode of operation in many Linux  
distros. They are mounted automatically, and typically you don’t need to  
worry about them.

I recommend reading at least the section about tmpfs in mount(8) manual  
page:

> **[mount(8): mount filesystem - Linux man page](https://linux.die.net/man/8/mount)**
>
> mount -a \[-t type\] \[-O optlist\] (usually given in a bootscript) causes all filesystems mentioned in fstab (of the proper type and/or having or not having ...

On Thursday, April 28, 2016 11:47:18 AM basti wrote:

> tmpfs 115M 0 115M 0% /dev/shm  
> Is there a way to manipulate the size of the “default” tmpfs shown
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)  
> –  
> Sincerely yours,  
> Styopa S..

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 28, 2016, 9:58pm UTC](https://www.ruby-forum.com/t/question-about-tmpfs/244535/3 "2016-04-28T21:58:33Z")

</div>

> What happens when a add a new tmpfs partition e.g for squid?

tmpfs uses also swap.  
So if you make the fs larger than actual ram and it starts to go beyond  
the  
physical memory limit things will be swaped out to disk (harddrive) and  
everything might become slow(er).

In general if you can’t fit the data in ram it’s not a good idea also  
linux  
file cache should keep accessed files in ram so unless you suffer from  
write  
speeds (even those if not specifically O\_DIRECT will go to ram first and  
later flushed) the reads will come as much as possible from ram anyways.

rr
