# Tmpfs instead of swapfile

**URL:** <https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284>\
**Category:** Newbie\
**Created:** [June 15, 2020, 12:43pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284 "2020-06-15T12:43:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandent](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/b/e19b73/32.png) [@brandent](https://forum.endeavouros.com/u/brandent)\
**Post date:** [June 15, 2020, 12:43pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/1 "2020-06-15T12:43:27Z")

</div>

Hi!  
I am an old newbie here.  
I have been using Endeavour OS last few weeks and I like it!  
A couple of years ago I came to the conclusion that “vanilla” Arch takes more time than I have. Then I found Archlabs, and I like that very much but the mirrors for their repo are too slow (50k at the most) for me up here in North Scandinavia!  
EOS is working very well and less then 10 min to install!  
I had som troubles installing on an old mac-mini 4,1 (mid 2010) but I found an Ubuntu-tweak to make it work! Nouveau is difficult on my mac-mini.  
Now I am writing from a HP-ProBook 640 G1 and it is very compatible with linux!

Question:

I see in fstab tmpfs. Is that acting as swapspace instead of swapfile/swap partition?

brandent

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [June 15, 2020, 12:55pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/2 "2020-06-15T12:55:52Z")

</div>

> [@brandent](#):
>
> I see in fstab tmpfs.

I am not sure you should be seeing it in `/etc/fstab`. At least, I don’t have it in my EOS install. Are you sure you didn’t see it somewhere else like `df` or `mount`?

> [@brandent](#):
>
> Is that acting as swapspace instead of swapfile/swap partition?

No, tmpfs is used to mount a filesystem in memory. This is typically done to create a small filesystem which can be read/written rapidly.

[https://wiki.archlinux.org/index.php/Tmpfs](https://wiki.archlinux.org/index.php/Tmpfs)

---

<div class="post-metadata">

**Author:** ![brandent](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/b/e19b73/32.png) [@brandent](https://forum.endeavouros.com/u/brandent)\
**Post date:** [June 15, 2020, 1:05pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/3 "2020-06-15T13:05:22Z")

</div>

Ah now I know what it is! Itś Firefox on tmpfs!  
Then it would probably be a good idea to create a swapfile here!

Thanks for answer and support!

brandent

---

<div class="post-metadata">

**Author:** ![c00ter](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/c00ter/32/56915_2.png) [@c00ter](https://forum.endeavouros.com/u/c00ter)\
**Post date:** [June 15, 2020, 11:21pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/4 "2020-06-15T23:21:31Z")

</div>

@dalto, I installed Endeavour from the May ISO a couple of days ago. The installer did indeed add a tmpfs line to my fstab…

```auto
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

```

I did _not_ install with a swap partition, though I later created a swapfile and added that to fstab, but that is a separate line.

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [June 15, 2020, 11:25pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/5 "2020-06-15T23:25:49Z")

</div>

Huh, interesting. I recently re-installed off the latest ISO. I wonder why mine is different. Perhaps it depends on the options you choose.

---

<div class="post-metadata">

**Author:** ![freebird54](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/freebird54/32/83106_2.png) [@freebird54](https://forum.endeavouros.com/u/freebird54)\
**Post date:** [June 15, 2020, 11:28pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/6 "2020-06-15T23:28:27Z")

</div>

I wonder if it does that if you DON’T have a swap. It did not add it to mine, but I have a swap - however little it gets used…

---

<div class="post-metadata">

**Author:** ![c00ter](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/c00ter/32/56915_2.png) [@c00ter](https://forum.endeavouros.com/u/c00ter)\
**Post date:** [June 15, 2020, 11:34pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/7 "2020-06-15T23:34:53Z")

</div>

> [@dalto](#):
>
> Perhaps it depends on the options you choose.

Perhaps. It also added _discard_ per my SSD, which somewhat perturbed me. It’s just my opinion, but no installer routine should be doing that.

---

<div class="post-metadata">

**Author:** ![nnriyer](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/n/bbce88/32.png) [@nnriyer](https://forum.endeavouros.com/u/nnriyer)\
**Post date:** [June 16, 2020, 10:00am UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/8 "2020-06-16T10:00:25Z")

</div>

Is it required to create swap drive. If so how to make it use by EOS. My laptop only having 2GB Ram.

---

<div class="post-metadata">

**Author:** ![Tasia91](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tasia91/32/5720_2.png) [@Tasia91](https://forum.endeavouros.com/u/Tasia91)\
**Post date:** [June 16, 2020, 10:07am UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/9 "2020-06-16T10:07:01Z")

</div>

> [@nnriyer](#):
>
> Is it required to create swap drive.

It is recommended, especially for machines with less RAM. Check out this thread, some very good thoughts and links were posted there about swap.

> [@My question on Swap](https://forum.endeavouros.com/t/my-question-on-swap/4822):
>
> Is it necessary to have swap file. Just heard the most recent episode on Destination Linux and they are saying it is a must. Going on our Wiki I found a post by @Bryanpwo stating that if you are using an SSD it’s not a good idea. Now I do have the capability to add an HDD to this laptop as well. Please school me on Swap and would adding the HDD be a good idea?

---

<div class="post-metadata">

**Author:** ![toothandnail](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/t/a4c791/32.png) [@toothandnail](https://forum.endeavouros.com/u/toothandnail)\
**Post date:** [June 16, 2020, 10:38am UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/10 "2020-06-16T10:38:52Z")

</div>

> [@c00ter](#):
>
> > [@dalto](#):
> >
> > Perhaps it depends on the options you choose.
> 
> Perhaps. It also added _discard_ per my SSD, which somewhat perturbed me. It’s just my opinion, but no installer routine should be doing that.

I’m a bit surprised at that. Arch includes a systemd timer which performs a weekly discard. I was under the impression that was generally regarded as a better option. There were some problems with that timer a little while ago, but there is a solution suggested in that thread. I’d remove any discard from fstab and make sure the timer is activated.

---

<div class="post-metadata">

**Author:** ![brandent](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/b/e19b73/32.png) [@brandent](https://forum.endeavouros.com/u/brandent)\
**Post date:** [June 16, 2020, 12:54pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/11 "2020-06-16T12:54:45Z")

</div>

Wow!  
So I thought I had configured my Firefox to use tmpfs!?  
I wonder what tmpfs is doing then it it’s not for Firefox!?

I did add a swapfile and is it safe to remove tmpfs then?

brandent

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [June 16, 2020, 1:23pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/12 "2020-06-16T13:23:52Z")

</div>

If what you have in your /etc/fstab is the same as c00ter, it should be safe to remove it if you really want to. However, it has nothing to do with swap. I would probably not remove it unless you have a reason to.

That being said, I don’t know if it will matter or not since the default rules on Arch should put `/tmp` on a tmpfs anyway.

As an example, both of my EOS machines look like this:

```auto
# /etc/fstab: static file system information.
#                                                                                                             
# Use 'blkid' to print the universally unique identifier for a device; this may                               
# be used with UUID= as a more robust way to name devices that works even if                                  
# disks are added and removed. See fstab(5).                                                                  
#                                                                                                             
# <file system> <mount point> <type> <options> <dump> <pass>                                  
UUID=61C3-8D4F /boot/efi vfat umask=0077 0 2                               
UUID=800aada3-9603-40fb-ba82-0a97001e08ac / ext4 defaults,noatime 0 1                         
[dalto@eos ~]$ df -h                                                                                          
Filesystem Size Used Avail Use% Mounted on                                                              
dev 1.9G 0 1.9G 0% /dev                                                                    
run 2.0G 1.1M 2.0G 1% /run                                                                    
/dev/sda2 78G 12G 63G 16% /                                                                       
tmpfs 2.0G 0 2.0G 0% /dev/shm                                                                
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup                                                          
tmpfs 2.0G 4.0K 2.0G 1% /tmp                                                                    
/dev/sda1 300M 280K 300M 1% /boot/efi                                                               
tmpfs 391M 12K 391M 1% /run/user/1000  

```

As you can see, nothing in `/etc/fstab` but `/tmp` is still mounted on tmpfs.

---

<div class="post-metadata">

**Author:** ![brandent](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/b/e19b73/32.png) [@brandent](https://forum.endeavouros.com/u/brandent)\
**Post date:** [June 16, 2020, 2:06pm UTC](https://forum.endeavouros.com/t/tmpfs-instead-of-swapfile/5284/13 "2020-06-16T14:06:18Z")

</div>

Well tmpfs is actually very good. I will keep it. Thanks for showing!

brandent
