Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mounting /tmp in RAM (or as tmpfs) ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pieterhog
n00b
n00b


Joined: 20 Nov 2012
Posts: 10
Location: Groningen, NL, EU

PostPosted: Thu Aug 22, 2013 8:46 pm    Post subject: Mounting /tmp in RAM (or as tmpfs) ? Reply with quote

Hello Gentoo folk,

My laptop has 16 GB of RAM. I bought this with the plan to use RAM for temporary files. My question is if it is wise to:
1- make a ramdisk and mount /tmp to it; (disadvantage: I lose RAM to this RAMdisk)

2- or to use tmpfs for /tmp (disadvantage: my RAM can be filled with temporary files, e.g. Youtube files, and the system will start swapping.
* but if my swap is large enough this shouldn't be a problem, is it?

3- Would it be possible to make a rule that large temporary files go to a HDD and small temporary files to RAM?


Sorry if I miss the points here, I've been using linux for quite some years but I'm far from technical, so forgive me if my questions are dumb or worded wrong..... Thanks in advance!

Pieter
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 370

PostPosted: Thu Aug 22, 2013 10:00 pm    Post subject: Re: Mounting /tmp in RAM (or as tmpfs) ? Reply with quote

pieterhog wrote:
Hello Gentoo folk,

My laptop has 16 GB of RAM. I bought this with the plan to use RAM for temporary files. My question is if it is wise to:
1- make a ramdisk and mount /tmp to it; (disadvantage: I lose RAM to this RAMdisk)

2- or to use tmpfs for /tmp (disadvantage: my RAM can be filled with temporary files, e.g. Youtube files, and the system will start swapping.
* but if my swap is large enough this shouldn't be a problem, is it?

3- Would it be possible to make a rule that large temporary files go to a HDD and small temporary files to RAM?


Sorry if I miss the points here, I've been using linux for quite some years but I'm far from technical, so forgive me if my questions are dumb or worded wrong..... Thanks in advance!

Pieter


2 is probably the better option. There is a limit on how big tmpfs will grow that you change with an option in your fstab. By default it is 1/2 your RAM I think.
Back to top
View user's profile Send private message
pieterhog
n00b
n00b


Joined: 20 Nov 2012
Posts: 10
Location: Groningen, NL, EU

PostPosted: Fri Aug 23, 2013 11:02 am    Post subject: Reply with quote

Thank you Nicias.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum