You are not logged in.

#1 2009-03-20 08:23:24

lwpro
Member
Registered: 2009-03-17
Posts: 11

Over using tmpfs?

I tried to use tmpfs to be mounted at /tmp, and under that folder I can have a much more speed of compiling, and I don't know If I can have more folders to use tmpfs. I have thought of /var/tmp but I check the pathname website and it says that /var/tmp is intended for files to be remained between reboots.
So Can I make more use of tmpfs or maybe it's just a waste of time? Some suggestions?

Offline

#2 2009-03-20 09:01:05

glad
Member
From: Norway
Registered: 2005-11-01
Posts: 103
Website

Re: Over using tmpfs?

For starters, why did you create five posts about the same topic?

But you can have the Firefox profile in tmpfs, it makes firefox a lot faster wink

But you have to unpack it to tmpfs at every boot, but for that you can use a script wink

Offline

#3 2009-03-20 09:35:24

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: Over using tmpfs?

please don't spam the forum...it just makes people less willing to help you.


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#4 2009-03-20 09:48:17

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Over using tmpfs?

I've made /tmp a symlink to /dev/shm, that's even simpler than creating a mount point.
But sorry, no idea about other directories or apps.


1000

Offline

#5 2009-03-20 10:06:03

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,642

Re: Over using tmpfs?

I'm unsing tmpfs for /tmp and use it everytime for compiling packages. It gives me about 30% speedup compared to regular disc usage(eg OOo 85min->60min).

Offline

#6 2009-03-20 12:32:13

lwpro
Member
Registered: 2009-03-17
Posts: 11

Re: Over using tmpfs?

I am so sorry, Because of a network lag and that makes me click may times on the "Submit"...

Offline

#7 2009-03-20 15:51:42

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Over using tmpfs?

byte wrote:

I've made /tmp a symlink to /dev/shm, that's even simpler than creating a mount point.
But sorry, no idea about other directories or apps.

So would this be just:

ln -s /dev/shm /tmp


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#8 2009-03-20 16:25:33

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Over using tmpfs?

lwpro wrote:

I am so sorry, Because of a network lag and that makes me click may times on the "Submit"...

Next time just hit submit once and then if it lags copy your post and see if it went through. Just a tip.


Website - Blog - arch-home
Arch User since March 2005

Offline

#9 2009-03-21 12:01:01

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: Over using tmpfs?

Recently i've found an interesting article about joining ramdisk (for speed) and physical storage (for plenty of space). The case was MySQL server, which benefits from temp dir on ramdisk, but sometimes may need up to serveral gigabytes available.

Offline

#10 2009-03-23 09:56:27

muunleit
Member
From: Germany
Registered: 2008-02-23
Posts: 234

Re: Over using tmpfs?

lwpro wrote:

So Can I make more use of tmpfs or maybe it's just a waste of time? Some suggestions?

Maybe this wiki-page will help you. => http://wiki.archlinux.org/index.php/Ramdisk


"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton

Offline

#11 2009-03-23 22:37:54

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: Over using tmpfs?

Slightly OT: What's the difference between ramfs and tmpfs in a nutshell?

Offline

#12 2009-03-23 23:04:29

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: Over using tmpfs?

fukawi2 wrote:

Slightly OT: What's the difference between ramfs and tmpfs in a nutshell?

From the Ramdisk wiki...

If you don't have a lot of spare ram, it is recommended to use 'tmpfs' instead of 'ramfs', as tmpfs uses Swap when the available RAM starts to run out, whereas ramfs doesn't. of course, dipping into swap loses the performance benefits of RAM, so it's a little pointless unless you have a lot of spare RAM.

Offline

#13 2009-03-24 00:17:41

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,577

Re: Over using tmpfs?

ramfs is almost completely replaced (from a user standpoint) by tmpfs, since tmpfs allows you to set size used limits, and can use swap if it's there.

Offline

#14 2009-03-24 04:05:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: Over using tmpfs?

Sweet, thanks guys smile

*passes topic back to OP*  (sorry!)

Offline

#15 2009-03-24 14:52:18

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,577

Re: Over using tmpfs?

OP, you are correct that /var/tmp should not lose data between reboots. Having /tmp as a tmpfs is a good practice for compiling, especially since it drastically reduces hard drive wear (or SSD wear!), but leave /var/tmp as a 'real' partition / directory. I doubt anything very speed-dependent like compiler stuff will be stored there anyways.

Offline

#16 2009-03-25 11:21:58

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Over using tmpfs?

Ranguvar wrote:

I doubt anything very speed-dependent like compiler stuff will be stored there [/var/tmp] anyways.

So far I've only seen it used by KDE for its cache data.


1000

Offline

#17 2009-03-26 23:55:48

steve-e
Member
Registered: 2007-10-03
Posts: 37

Re: Over using tmpfs?

Ranguvar wrote:

OP, you are correct that /var/tmp should not lose data between reboots. Having /tmp as a tmpfs is a good practice for compiling, especially since it drastically reduces hard drive wear (or SSD wear!), but leave /var/tmp as a 'real' partition / directory. I doubt anything very speed-dependent like compiler stuff will be stored there anyways.

I am running arch and /var/tmp mounted as tmpfs for several years now. No notable problem so far.

Offline

#18 2009-03-27 02:45:39

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Over using tmpfs?

ramfs is almost completely replaced (from a user standpoint) by tmpfs, since tmpfs allows you to set size used limits, and can use swap if it's there.

only partially true:

ramfs can have set size too:
ramdisk_size=xxx (append to grub)
next configure ramdisk in rc.local
use ramdisk for anything you want (size limitation of course). It is safe if you follow Arch wiki regarding hdd writing before shutdown.

Offline

#19 2009-03-27 05:34:11

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,642

Re: Over using tmpfs?

Writing down the whole /tmp content at shutdown doesn't make much sense to me. The intend of the /tmp directy is to store _runtime_ datas you can delete at reboot. So every distribution does in the init sripts. Also writing down all of my  several gb /tmp(fs) to disc would take a lot of time.

I only 'cp' what I need to ~/tmp.

Hint: tmpfs seems to have issues at shutdown sometimes. When I have used it so extensively that it extends to use swap it has problems to get umounted at shutdown. So it's better to rm -rf /tmp/* before typing reboot wink

Offline

#20 2009-03-27 09:28:41

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,002
Website

Re: Over using tmpfs?

Ranguvar wrote:

Having /tmp as a tmpfs is a good practice for compiling, especially since it drastically reduces hard drive wear (or SSD wear!), but leave /var/tmp as a 'real' partition / directory.

You can always make /var/tmp (and similars) ext4, or any other separate filesystem and increase the commit/flush intervals.

Imho "using tmpfs but with a script to populate/save data to/from it at certain points" is pretty much the same as using a normal filesystem that gets synced infrequently.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#21 2009-03-27 14:27:12

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Over using tmpfs?

well temp means temporary so holding to it makes not much sense.

interesting that nobody is trying to tweak disk I/O latencies and vm (I don't mean useless vm.swappiness=0)

Offline

#22 2009-05-19 16:51:20

jck
Member
From: USA
Registered: 2009-05-08
Posts: 98

Re: Over using tmpfs?

when i compile programs it automatically uses /tmp ?

Offline

#23 2009-05-27 17:22:15

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: Over using tmpfs?

Hmm i will try it that ,but i got question wiki says:
none     /path/to/location     ramfs     0     0
What i should write in /patch/to/location?
Meaby /dev/ram0 or something?


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#24 2009-05-27 23:03:28

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: Over using tmpfs?

SpeedVin wrote:

none     /path/to/location     ramfs     0     0
What i should write in /patch/to/location?
Meaby /dev/ram0 or something?

Uhhh, /tmp perhaps?

Offline

#25 2009-05-28 00:19:59

DevoidOfWindows
Member
Registered: 2009-05-24
Posts: 133

Re: Over using tmpfs?

haxit wrote:
byte wrote:

I've made /tmp a symlink to /dev/shm, that's even simpler than creating a mount point.
But sorry, no idea about other directories or apps.

So would this be just:

ln -s /dev/shm /tmp

Better idea:

mkdir /dev/shm/tmp /dev/shm/lock
chmod 1777 /dev/shm/tmp /dev/shm/lock
mount --bind /dev/shm/tmp /tmp
mount --bind /dev/shm/tmp /var/tmp
mount --bind /dev/shm/lock /var/lock

Offline

Board footer

Powered by FluxBB