You are not logged in.

#1 2012-12-31 04:50:42

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

[SOLVED] Is /var/tmp on RAM?

I was reading about creating a ramdisk to prolong the life of my SSD, and it seems like a quick solution is to move files to /var/tmp, as these files aren't deleted but are still temprorary. Are they on RAM or are they just stored on my regular drive?
    Thanks, ~Unsolved Cypher

Last edited by UnsolvedCypher (2012-12-31 19:14:24)

Offline

#2 2012-12-31 05:50:32

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Is /var/tmp on RAM?

/usr/lib/systemd/system/tmp.mount


Edit: There are two types of RAM disks.  One is ramfs and the other is tmpfs.  They're basically the same except the tmpfs is dynamically sized.

Last edited by WonderWoofy (2012-12-31 05:52:42)

Offline

#3 2012-12-31 14:27:28

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

WonderWoofy wrote:

/usr/lib/systemd/system/tmp.mount


Edit: There are two types of RAM disks.  One is ramfs and the other is tmpfs.  They're basically the same except the tmpfs is dynamically sized.

I'm assuming this mean that /tmp is mounted as tmpfs, but /var/tmp is not. If I am correct, would modifying the file be the way to go in order to put /var/tmp in the tmpfs as well, or would I have to do something different because /var/tmp should not be cleared on reboot?
  Thanks!

Offline

#4 2012-12-31 14:42:32

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Is /var/tmp on RAM?

you shouldn't do anything, /var/tmp is not supposed to be cleared on reboot. Applications may rely on this, so you shouldn't mess with that.

imho you shouldn't be worried about this, afaik modern SSDs have a write cycle that you wouldn't be able to reach in your lifetime. And as far as I can see, there isn't much stuff written to /var/tmp anyway.

Offline

#5 2012-12-31 14:48:21

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

65kid wrote:

you shouldn't do anything, /var/tmp is not supposed to be cleared on reboot. Applications may rely on this, so you shouldn't mess with that.

imho you shouldn't be worried about this, afaik modern SSDs have a write cycle that you wouldn't be able to reach in your lifetime. And as far as I can see, there isn't much stuff written to /var/tmp anyway.

What I want to do is to put /var/tmp onto my RAM, but make sure that it does not clear on reboot. How would I go about doing this? Also, SSDs would last about 20 years if 50 GB was written daily. So yes, they last a while, but I'd just like to reduce unnecessary writes in addition to the nice speed boost.

Offline

#6 2012-12-31 15:20:18

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Is /var/tmp on RAM?

UnsolvedCypher wrote:

What I want to do is to put /var/tmp onto my RAM, but make sure that it does not clear on reboot. How would I go about doing this?

you can't do this. RAM drive = lost on reboot.

UnsolvedCypher wrote:

Also, SSDs would last about 20 years if 50 GB was written daily. So yes, they last a while, but I'd just like to reduce unnecessary writes in addition to the nice speed boost.

They are not unnecessary, applications don't just write there for no reason.

I still don't see the point of this, just don't worry about it.

Offline

#7 2012-12-31 15:44:15

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

65kid wrote:
UnsolvedCypher wrote:

What I want to do is to put /var/tmp onto my RAM, but make sure that it does not clear on reboot. How would I go about doing this?

you can't do this. RAM drive = lost on reboot.

UnsolvedCypher wrote:

Also, SSDs would last about 20 years if 50 GB was written daily. So yes, they last a while, but I'd just like to reduce unnecessary writes in addition to the nice speed boost.

They are not unnecessary, applications don't just write there for no reason.

I still don't see the point of this, just don't worry about it.

I believe it would be possible to copy the files back to my SSD before reboot or shutdown. Also, I have symbolically linked some applications' caches and other operational files to this location thinking that the tmp meant that it was on tmpfs. So, I would like to actually put this on tmpfs.
Example: Browser running from RAM reduces tiny file writes and also speeds up things like cache.

Offline

#8 2012-12-31 15:47:14

boast
Member
Registered: 2010-09-28
Posts: 219

Re: [SOLVED] Is /var/tmp on RAM?

UnsolvedCypher wrote:

I believe it would be possible to copy the files back to my SSD before reboot or shutdown. Also, I have symbolically linked some applications' caches and other operational files to this location thinking that the tmp meant that it was on tmpfs. So, I would like to actually put this on tmpfs.
Example: Browser running from RAM reduces tiny file writes and also speeds up things like cache.

try https://wiki.archlinux.org/index.php/An … ync-daemon ?


Asus M4A785TD-V ;; Phenom II X4 @ 3.9GHz ;; Ripjaws 12GB DDR3-1600 ;; 128GB Samsung 830 ;; MSI GTX460 v2 w/ blob ;; Arch Linux + KDE 4.x

Offline

#9 2012-12-31 15:48:32

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Is /var/tmp on RAM?

UnsolvedCypher wrote:

I believe it would be possible to copy the files back to my SSD before reboot or shutdown.

yes, you could. You would have to copy the files from /var/tmp to the SSD and then back to /var/tmp on bootup. This saves you exactly 0 write cycles - congratulations!

UnsolvedCypher wrote:

Also, I have symbolically linked some applications' caches and other operational files to this location thinking that the tmp meant that it was on tmpfs. So, I would like to actually put this on tmpfs.
Example: Browser running from RAM reduces tiny file writes and also speeds up things like cache.

So link them to /tmp ?

Offline

#10 2012-12-31 15:50:00

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

65kid wrote:

So link them to /tmp ?

I'll do that, good idea. But how would I copy the files back before shutdown?

Offline

#11 2012-12-31 15:57:52

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

boast wrote:
UnsolvedCypher wrote:

I believe it would be possible to copy the files back to my SSD before reboot or shutdown. Also, I have symbolically linked some applications' caches and other operational files to this location thinking that the tmp meant that it was on tmpfs. So, I would like to actually put this on tmpfs.
Example: Browser running from RAM reduces tiny file writes and also speeds up things like cache.

try https://wiki.archlinux.org/index.php/An … ync-daemon ?

That's very useful, thanks. I will look into this.

Offline

#12 2012-12-31 16:40:15

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

Ok, I am not using Profile Sync Daemon, but it isn't starting:

[me@localhost ~]$ sudo systemctl start psd.service
Job for psd.service failed. See 'systemctl status psd.service' and 'journalctl -xn' for details.
[me@localhost ~]$ systemctl status psd.service
psd.service - Profile-sync-daemon
	  Loaded: loaded (/usr/lib/systemd/system/psd.service; enabled)
	  Active: failed (Result: exit-code) since Mon, 2012-12-31 11:32:59 EST; 10s ago
	 Process: 3402 ExecStart=/usr/bin/profile-sync-daemon sync (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/psd.service

Does anyone have any ideas as to why?
  Thanks!

Offline

#13 2012-12-31 17:18:02

WorMzy
Forum Moderator
From: England
Registered: 2010-06-16
Posts: 5,012

Re: [SOLVED] Is /var/tmp on RAM?

Add yourself the adm group, or use "sudo systemctl status ..." to see the relevent journal info.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Online

#14 2012-12-31 19:14:03

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

WorMzy wrote:

Add yourself the adm group, or use "sudo systemctl status ..." to see the relevent journal info.

Thanks, adding myself to the group worked. This does what I want, so I will mark this thread as solved. Thank you to everyone who helped.

Offline

#15 2012-12-31 21:40:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Is /var/tmp on RAM?

Hey, sorry I didn't read your post quite right, and my brain was for some reason telling me that you were asking about /tmp.

Offline

#16 2012-12-31 23:19:35

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: [SOLVED] Is /var/tmp on RAM?

WonderWoofy wrote:

Hey, sorry I didn't read your post quite right, and my brain was for some reason telling me that you were asking about /tmp.

No, it's fine. It still helped remind me about tmpfs vs ramdisk.

Offline

Board footer

Powered by FluxBB