SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This filesystem in RAM will always only occupy only the space that is actually used. By default it is limited to half the size of your RAM, but you can change that with the size mount option.
/dev/shm has a very specific purpose (providing shared memory for inter-process communication). It makes sense to not use it for a different purpose, but rather to separate different use-cases, especially when it comes with virtually no costs to do so.
This filesystem in RAM will always only occupy only the space that is actually used. By default it is limited to half the size of your RAM, but you can change that with the size mount option.
currently i use a addition to "append="... ramdisk_size=8192000" in lilo.conf, and
mkfs-t ext2 -q /dev/ram1 8192000
mount /dev/ram1 /mnt/ramdisk
in rc.local
why tmpfs is better than this?
i have a 16 Gb RAm on that machine, and 8 Gb ramdisk is sufficient for my purposes.
also, maybe anyone can explain, in what ways /dev/ram0 differ from /dev/ram1 / ram2 and so on?
No, you don't mount /dev/shm. /dev/shm has a very specific purpose and I wouldn't use it for other things. You can just mount a new tmpfs (tmpfs is a virtual filesystem) to any directory you want. For example, on my main machine I mount a tmpfs to /tmp on boot, so that all actions in /tmp automatically run on a RAM-disk.
The only downside I know of with tmpfs is that there are no quota controls possible on it.
A user/process may fill tmpfs using up the amount of memory the mount is limited to (1/2 ram by default).
Using several such mounts allows a DOS attack (inadvertent OOM) that can't be avoided.
Fedora uses a tmpfs for /run - filling that filesystem causes services to fail, login failures, and OOM failures.
It is sort of reasonable for workstations, but very limited for servers (the use for shared memory is the only reasonable use I know of) as it allows users the ability to wipe out the usability of the system.
Slackware too. It doesn't show up in /etc/mtab, but just have a look at /proc/mounts.
I don't see it... /run is part of my root filesystem. Second, no user can write to /run anyway.
Quote:
That's what you can expect from quality Red Hat software.
I don't blame RH for that one (yet, I haven't tested their beta release). Some of their developers are a group of prima donnas in that even though they don't understand servers, that whatever they do is appropriate. They are also a bit ignorant of past technology... network analysis tools for ordering went out back in the 80s due to combinatorial explosion in complexity. Yet, they think they can get it to work reliably, and have foisted off an inherently unreliable init system.
I don't see it... /run is part of my root filesystem. Second, no user can write to /run anyway.
The mount is done in /etc/rc.d/rc.S:
Code:
# If /run exists, mount a tmpfs on it (unless the
# initrd has already done so):
if [ -d /run ]; then
if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then
/sbin/mount -v -n -t tmpfs tmpfs /run -o mode=0755
fi
fi
Quote:
I don't blame RH for that one (yet, I haven't tested their beta release). Some of their developers are a group of prima donnas in that even though they don't understand servers, that whatever they do is appropriate.
As a business they are as successful as Microsoft in their respective field. You just do not need well-designed software from able developers to pull that off, that may even stand in the way of that business model.
Quote:
They are also a bit ignorant of past technology... network analysis tools for ordering went out back in the 80s due to combinatorial explosion in complexity. Yet, they think they can get it to work reliably, and have foisted off an inherently unreliable init system.
That is why stopped following the whole "technology" buzz (with programming language/framework of the week) and stay with Slackware (to get back on topic here). Some IT people think they can live without heritage, but IMHO making up stuff ad-hoc all the time is not a reputable profession. So one has to decide if he is either ignorant of the past or an IT professional. One can't be both.
# If /run exists, mount a tmpfs on it (unless the
# initrd has already done so):
if [ -d /run ]; then
if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then
/sbin/mount -v -n -t tmpfs tmpfs /run -o mode=0755
fi
fi
Got it. At least slakware doesn't allow any user process access to it. That is where the problem lies.
Slackware is using /var/run (part of /var which is root) for what RH uses /run.
Quote:
As a business they are as successful as Microsoft in their respective field. You just do not need well-designed software from able developers to pull that off, that may even stand in the way of that business model.
I have no problem with some of what they do. SELinux, for instance, is a good thing to use to isolate one service from another, and from users. I'm not fond of the use of cgroups. There are good aspects, but also some bad side effects.
Quote:
That is why stopped following the whole "technology" buzz (with programming language/framework of the week) and stay with Slackware (to get back on topic here). Some IT people think they can live without heritage, but IMHO making up stuff ad-hoc all the time is not a reputable profession. So one has to decide if he is either ignorant of the past or an IT professional. One can't be both.
I intend to stay with slackware myself. I have been using RH/Fedora because that is what the workplace used. But I have been migrating back...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.