You are not logged in.
Is it safe to mount /tmp as a partition on the hard drive, I've done it before, but I'm not sure if it's healthy for the drive in question. I started doing that because I was tired of having to constantly be emptying out /tmp every time I installed something big like WINE from the AUR. Checked the wiki regarding fstab, but it doesn't mention using a partition as /tmp or how to make that partition act as a truely temporary partition.
Last edited by lspci (2012-09-21 15:27:14)
Offline
If you make sure to use the partition type tmpfs in your fstab for /tmp then it should be a ramdisk and it should clear out when you turn off your computer or the power cuts.
Offline
If you make sure to use the partition type tmpfs in your fstab for /tmp then it should be a ramdisk and it should clear out when you turn off your computer or the power cuts.
Yeah, but then I max out my 8 gigs of RAM on a regular basis. I'd like to keep my RAM usage down.
Offline
Wow, you really max out 8G on a regular basis? Do you have a swap partition? You can set how much memory tmpfs uses before it hits swap:
By default, a tmpfs partition has its maximum size set to half your total RAM, but this can be customized. Note that the actual memory/swap consumption depends on how much you fill it up, as tmpfs partitions do not consume any memory until it is actually needed.
I don't really understand this question
Is it safe to mount /tmp as a partition on the hard drive, I've done it before, but I'm not sure if it's healthy for the drive in question.
Why would it not be "safe" or "healthy for the drive in question" ?
Last edited by 2ManyDogs (2012-09-20 21:13:18)
Offline
Wow, you really max out 8G on a regular basis? Do you have a swap partition? You can set how much memory tmpfs uses before it hits swap:
ArchWiki wrote:By default, a tmpfs partition has its maximum size set to half your total RAM, but this can be customized. Note that the actual memory/swap consumption depends on how much you fill it up, as tmpfs partitions do not consume any memory until it is actually needed.
I don't really understand this question
Is it safe to mount /tmp as a partition on the hard drive, I've done it before, but I'm not sure if it's healthy for the drive in question.
Why would it not be "safe" or "healthy for the drive in question" ?
'Cause uhh... the tmp partition is always changing? o.O I dunno. I remember reading it somewhere that it wasn't safe to do that to /var so I figured that the same would go for /tmp... guess not.
Yep, I generally reach about 90% RAM usage by the end of the day. Right now I'm only at 19%, but I'm in class so I haven't really been doing much of anything. Most days though I'm like browsing through the AUR and other repos and the internet looking for packages I might like.
Offline
Well, you have 8G of memory, so you might as well use it I understand the feeling though -- I have 4G and if I get over 1G used I get anxious... I suppose if I was making full use of the memory I would want to get to 90% used. It's there, why not use it? Otherwise it's just wasted...
Offline
Is it safe to mount /tmp as a partition on the hard drive, I've done it before, but I'm not sure if it's healthy for the drive in question. I started doing that because I was tired of having to constantly be emptying out /tmp every time I installed something big like WINE from the AUR. Checked the wiki regarding fstab, but it doesn't mention using a partition as /tmp or how to make that partition act as a truely temporary partition.
You can use a regular partition as backing for /tmp without problems. It will be cleared on boot and hence appear to be truly temporary (assuming that's what you meant).
However, I think from a performance point of view you'd be bettor off just adding that space as swap. This will allow your /tmp to be bigger, but won't write to the partition unless you need to due to lack of ram, hence saving your hardware by keeping writes down and speeding things up (at least in some cases: http://www.toofishes.net/blog/mysql-and-tmp-tmpfs/ ).
Offline
Well, you have 8G of memory, so you might as well use it I understand the feeling though -- I have 4G and if I get over 1G used I get anxious... I suppose if I was making full use of the memory I would want to get to 90% used. It's there, why not use it? Otherwise it's just wasted...
You know, I really like that. I mean, you're absolutely right, why have extra RAM and then not use it? I should be grateful for the extra RAM and try to take advantage of its benefits as much as possible.
lspci wrote:Is it safe to mount /tmp as a partition on the hard drive, I've done it before, but I'm not sure if it's healthy for the drive in question. I started doing that because I was tired of having to constantly be emptying out /tmp every time I installed something big like WINE from the AUR. Checked the wiki regarding fstab, but it doesn't mention using a partition as /tmp or how to make that partition act as a truely temporary partition.
You can use a regular partition as backing for /tmp without problems. It will be cleared on boot and hence appear to be truly temporary (assuming that's what you meant).
However, I think from a performance point of view you'd be bettor off just adding that space as swap. This will allow your /tmp to be bigger, but won't write to the partition unless you need to due to lack of ram, hence saving your hardware by keeping writes down and speeding things up (at least in some cases: http://www.toofishes.net/blog/mysql-and-tmp-tmpfs/ ).
Okay, then I'll set up my tmpfs to be like 10 gigs or something like that... I think that my swap space is like 10 gigs
$ lsblk
...
|-sda6 8:6 0 9.8G 0 part [SWAP]
...
yep, it's like 10 gigs, lol. I've got a feeling that maybe 10 gigs is a bit overkill, but since I just figured that the more the merrier I went ahead and devoted 10 gigs to swap space anyway.
I think the real solution here is not to build packages in /tmp.
Aww, but I like building packages in /tmp. (And indeed, I intend to continue doing so.)
Last edited by lspci (2012-09-21 01:29:20)
Offline
I was tired of having to constantly be emptying out /tmp every time I installed something big like WINE from the AUR
Aww, but I like building packages in /tmp. (And indeed, I intend to continue doing so.)
This makes my head hurt. Really. Stop building in /tmp.
Offline
lspci wrote:I was tired of having to constantly be emptying out /tmp every time I installed something big like WINE from the AUR
lspci wrote:Aww, but I like building packages in /tmp. (And indeed, I intend to continue doing so.)
This makes my head hurt. Really. Stop building in /tmp.
You serious?
Offline
but as I know pacaur, packer, yaourt use /tmp for building thing
if not /tmp was is the "best place" for build?
Last edited by Jristz (2012-09-21 04:47:58)
Well, I suppose that this is somekind of signature, no?
Offline
AFAIK yaourt deletes all the build files in /tmp after the package has been built and installed. I build AUR packages in ~/build, keeps the place tidy and the packages are available if I need to re-install them.
Offline
AFAIK yaourt deletes all the build files in /tmp after the package has been built and installed. I build AUR packages in ~/build, keeps the place tidy and the packages are available if I need to re-install them.
I didn't even know that you could tell packer to build things in anywhere else but /tmp. What's the problem with building them in /tmp, though? Is it just messy, unhealthy for the device, what?
Offline
I don't think there's anything wrong with building inside a tmpfs -- I have a 15GB tmpfs which I compile/package in all the time -- unless a] you're building something that needs more space than your tmpfs allows (which will cause the build to fail once it hits a "no space left on device" error), or b] you go on to ask how to change your /tmp to a partition because you keep filling it with files from compiling things.
Why not compile in another directory, and clear that using tmpfiles.d?
It will cause more wear-and-tear on your HDD, but it won't fill up your tmpfs (which is only half your available RAM by default, btw).
see also: Building in a Clean Chroot/devtools
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline