вторник, 17 декември 2013 г.

Not enough place on my /tmp???

Today, I realized just how small is my /tmp partition by default. It turned out that it's only 100MB and if you happen not to like restarting, just like me, you will run out of space sooner rather than later.
In principle, the /tmp partition gets emptied upon reboot (you can check for your reboot rules with $nano /etc/conf.d/bootmisc ) , but in my case, this is no good. So what can you do?
First, you can change your /tmp size.
1. $su -c "nano /etc/fstab"
2. Change the line concerning the /tmp. In my case, I made it:
tmpfs                   /tmp                    tmpfs   noexec,nosuid,nodev,size=1000M 0 0
3. After restart, check your tmp size with:
$df -h
I still have to restart to see if it works. In the mean time,you can try deleting your /tmp to free some space. Like
$cd /tmp
$sudo rm -r *
Do the last one only from inside your /tmp dir! Otherwise, you might delete more than you want and much more than it is healthy!!!
Another smart way to increase the /tmp size without restarting can be found here
Finally, I just discovered this Sabayn wiki on how to optimize your system, where you can find how to mount your /tmp partition on your ram so that everything runs faster. I currently have 16GB ram so I guess it makes some sense to do that.

Ram Drive using tmpfs

Because temp folders are cleared during shutdown, it is safe to place their storage locations in RAM. This reduces the number of disk operations, making programs that use temp folders faster. Open the file and append the lines: file: /etc/fstab
  ...
  tmp     /tmp      tmpfs rw,mode=1777 0 0
  vartmp  /var/tmp  tmpfs rw,mode=1777 0 0 
"mode=1777" option allows all users write access, but prevents deletion of files belonging to other users.

I'll try this later, and we'll see how it works. 


Няма коментари:

Публикуване на коментар