Tag Info

Hot answers tagged

15

Linux provides a tmpfs device which any user can use, /dev/shm. It is not mounted to a specific directory by default, but you can still use it as one. Simply create a directory in /dev/shm and then symlink it to wherever you want. You can give the created directory any permissions you choose, so that other users can't access it. This is a RAM backed ...


8

You don't have to do all that, you can just mount /tmp as tmpfs by using a line like the following in /etc/fstab: tmpfs /tmp tmpfs mode=1777,nosuid,nodev 0 0 You can also do it live (but bear in mind stuff that is currently in /tmp on your current filesystem will not be able to be accessed except through the inode and currently open file descriptors, so ...


5

Your system may have one already available; recent Linux systems based on Glibc always have a tmpfs mounted on /dev/shm. If your system doesn't have one or it's too small, then a filesystem not mounted by root pretty much means FUSE. On Ubuntu, you need to be in the fuse group to use FUSE. Looking through available FUSE filesystems, I see only Ramfuse, ...


5

Shared memory is using the 12GB. On your Linux release /dev/shm part of the /dev filesystem (on some releases, it has its own a dedicated file system mounted there). As shown by lsof, the sum is 12 GB: /dev/shm/foo5.44m is 6269616128 bytes /dev/shm/kdfoo.a4o is 6269616128 bytes Neither find nor ls can display theses files because they are unlinked (= ...


3

There is no difference betweem tmpfs and shm. tmpfs is the new name for shm. shm stands for SHaredMemory. See: Linux tmpfs. The main reason tmpfs is even used today is this comment in my /etc/fstab on my gentoo box. BTW Chromium won't build with the line missing: # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for # POSIX shared memory ...


3

You can resolve which filesystem a directory or file is on with the command df, and if you include the -T option, the output will include the filesystem type. $ df -T /tmp Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/sda3 ext4 38715020 5073600 31674780 14% / In the above example, the /tmp directory is on an ext4 filesystem, ...


3

Imagine you want to bake a cake. You don't know the recipe, but it's okay: you have your cookbook. You take your cookbook out of your locked safe and open it... and here's what you see: sN+zBL0+S/TNORDzFUADrzbv2K5A5zb62o1WPqDA/1vtfiOTVFJnVRaU/++JSjABIBWw7PjHm+cg RnhGFHGv4xy0wTZi5vw8jTiJsgF6pzvOeVaDoiXdHliGFbiCM1rGxyziNesA5RLoLQx5EzGqNzw2 ...


3

use ramfs instead of tmpfs. ramfs is a ramdisk (no swap) tmpfs can be both in your /etc/fstab: none /path/to/location ramfs defaults,size=512M 0 0 edit the size parameter to whatever you like but be careful not to exceed your actual amount of ram. NOTE: the use of a ramfs instead of tmpfs is not something i would recommend. you will find ...


3

It's perfectly okay to use some directory in /run as long as you have the appropriate rights on it. In some modern distros, /tmp is already a virtual file system in memory or a symlink to a directory inside /run. If this is your case (you can check that in /etc/fstab, or typing mtab), you could use /tmp as your temporary directory. Also, don't get confused ...


2

Is the device file meaningless in this context? Yes, I think so. I cannot find evidence in the Linux documentation for this, but Googling around did point me at this in the NetBSD documentation about mount_tmpfs to support my thought: The tmpfs parameter only exists for compatibility with the other mount commands and is ignored. So, I guess it ...


2

You're going to need some very specialized hardware to do what you're trying to do. Here are the constraints: The program must be in RAM, because that's where the CPU can find it. It doesn't matter how it got there. The program must not be in RAM unencrypted. I don't know where you want to store the encryption key. Let's assume it's stored in a TPM ...


2

When a program is executed, the necessary code pages are loaded into memory on demand. This is transparent: the kernel loads the pages when it needs them, and tries to be smart by preloading pages that are likely to be needed soon. The code has to be decrypted before it can be executed. If the code is stored on an encrypted filesystem, it is decrypted ...


2

tmpfs is not better than the disk cache. So if you want to speed up the Chrome start then you just need to read all the files which Chrome is going to need: cat file1 file2 file2 ... >/dev/null If you find out in which order the files are on the disk then you can optimize the access by reading them in the right order. If you start Chrome afterwards ...


2

On Debian, and likely its derivatives, the script which handles unmounts before halt/reboot is /etc/init.d/umountfs. For me, the script does not umount any of the filesystems you have listed apart from tmpfs. The reason is given in the following comment: # Make sure tmpfs file systems are umounted before turning off # swap, to avoid running out of memory ...


1

There's no difference between shm and tmpfs (actually, tmpfs is only the new name of former shmfs). hugetlbfs is a tmpfs-based filesystem that allocates its space from kernel huge pages and needs some additional configuration afford (how to use this is explained in Documentation/vm/hugetlbpage.txt).


1

It's not clear what you're trying to achieve. By default (at least on Debian wheezy), /run/shm is a subdirectory of /run, which is mounted as tmpfs. So if you don't want /run/shm to be a mount point, don't change the default configuration. If you create an entry for /run/shm in /etc/fstab, it will be mounted only if you specify the filesystem type; otherwise ...


1

Try AVFS. It's a FUSE filesystem that lets you access archives transparently. Run this command once and for all: mkdir -p ~/.avfs grep -q "^avfsd $HOME/.avfs " /proc/mounts || avfsd ~/.avfs -o auto_cache AVFS exposes the content of an archive /path/to/foo.zip as a directory ~/.avfs/path/to/foo.zip# (same path, but under the AVFS mount point, and with an ...


1

Check out Xarchiver. See also this blog post: How to Install Xarchiver (archive manager) in Ubuntu Linux? You can choose the temp dir under Action -> Preferences.



Only top voted, non community-wiki answers of a minimum length are eligible