0

When I use the TMPFS set for /var/cache and I reboot the computer and then once the computer has booted back into the Ubuntu 13.10 and login and goto run the Ubuntu Software Center it loads for about 2 seconds and then crashes out.

My System is a

  • Intel I7
  • 16GB Memory
  • 1 x OCZ-SSD Drive 120GB BOOT Drive, With trim enabled in OS
  • 1 X WD-HDD Drive 250GB User Drive

Here is the TMPFS line that I add to the fstab file:

tmpfs /var/cache tmpfs defaults,noatime,mode=0755 0 0

and also tried

tmpfs /var/cache tmpfs defaults,noatime,mode=1777 0 0

When I remove the above line(s) the Ubuntu Software-center works fine..

  • Bro everything stored in tmpfs is temporary in the sense that no files will be created on the hard drive; however, swap space is used as backing store in case of low memory situations. On reboot, everything in tmpfs will be lost. – Sukupa91 Nov 21 '13 at 1:25
1

Of course it wouldn't work fine. Lets take a peek at what /var/cache has:

ls /var/cache
apt               cracklib  dictionaries-common  git       lxc       pppconfig        sublime-text-2
apt-xapian-index  cups      fontconfig           jockey    man       samba
auto-apt          debconf   gdm                  ldconfig  pm-utils  software-center

Among others things, the cache has about the most massive amount of cache archives, from the current package lists, to virtual machines, to all sorts of important data that it is used in all moment:

sudo du -sh /var/cache/*
517M    /var/cache/apt
88M     /var/cache/apt-xapian-index
72M     /var/cache/auto-apt
448K    /var/cache/cracklib
5.8M    /var/cache/cups
5.1M    /var/cache/debconf
36K     /var/cache/dictionaries-common
660K    /var/cache/fontconfig
4.0K    /var/cache/gdm
4.0K    /var/cache/git
4.0K    /var/cache/jockey
84K     /var/cache/ldconfig
488M    /var/cache/lxc
3.6M    /var/cache/man
4.0K    /var/cache/pm-utils
4.0K    /var/cache/pppconfig
4.0K    /var/cache/samba
5.7M    /var/cache/software-center
5.5M    /var/cache/sublime-text-2

Making the /var/cache a tmpfs just because is cache is a very bad move. Instead move it to an HDD if you don't want to wear your SSD (through, truth be told, /var/cache isn't written so often as it's read (unless you use samba)) instead using tempfs.

  • What about when trying to minimize the use of the overlay filesystem when running a persistent Live OS from a USB flash drive? – Kevin Sep 13 '16 at 13:46
  • if it's "important" why is it in /var/cache then. interesting how i just found this by looking if it has sideeffects on archlinux – GottZ Aug 28 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.