Changing File Descriptor Limits on Slackware 14.2
My main question is about changing the hard and soft limits for file descriptors, but I have a couple of other questions as well.
File descriptors issue - so need to change hard and soft limits According to Slackware Resource Limits I need to create an initscript file within the /etc folder and input Code:
# Increase the hardlimit for open files I am using E2guardian which is a filtering software based on Dansguardian. So it runs as an Mdaemon Service. So I don't know if it uses shell/bash or whatever as nobody is ever logged in. I need to be able to switch on the computer and boot Slackware and have E2guardian use the new software limit without logging into a shell. What is the recommended Hardware and Software limits for a modern system as 1024 is ridiculously low. E2guardian or Squid is always running out of file descriptors because of this 1024 limit. Is there anything else that I need to do besides raise hardware limit in initscript file and software limit in whatever file I am supposed to do this in. Do I need to do anything with the kernel for example? Time stamp I have noticed that some programs on Slackware are not using daylight saving so are always an hour off. Is there a way to force all programs to use the correct time. When I do date in Slackware, it shows the correct time but e2guardian logs show the wrong hour. Most reliable File System I use ReiserFS because I believe that this is the most reliable system in the event of a powercut. However, I have noticed on more than one occasion that I have had to re-install Slackware because Slackware would not boot (presumably after a power cut) or we have issues with running out of file descriptors despite the fact that nothing seems to be using up the file descriptors so I think that something went wonky after a power cut. Thank you for any help gratefully received. |
Quote:
Code:
cp /usr/doc/sysvinit-2.93/initscript.sample /etc/initscript Code:
ulimit -Sn 2048 Quote:
|
Quote:
/etc/sysctl.d/raise-file-descriptors.conf Code:
fs.file-max = 2097152 Code:
<snip> |
Quote:
no systemd and no sysctl, your advice is not applicable. |
Quote:
Code:
/sbin/sysctl -e -p /etc/sysctl.conf |
Quote:
|
Quote:
Are you saying that ulimit -Sn 2048 should go in the initscript file? I was under the impression that file was only for setting the hard limit? I don't have an initscript.sample file in the location mentioned. Only README, Install and a sysvinit-2.86.lsm file so maybe I need to install initscript. I will give it a go tomorrow and see how it goes. Thank you. |
Quote:
What I will do first is fix the hard and soft limit for each user which is the current problem and then I will see what the system wide file descriptor usage is on a machine humming away. If I need to adjust this, I will do that too. Thank you. |
Quote:
Does sysctl not look in the sysctl.d directory for scripts to run? |
Apparently my version of Slackware has the initscript.sample file in the sbin folder. I am not running current. I am running version 14.2. However on the new system, I will be updating to current as I need to update a number of things to get certificates to work properly in E2guardian. So maybe this will change after I upgrade to Current.
|
Quote:
|
Quote:
From `man sysctl`; Code:
--system |
Quoting myself:
Create /etc/initscript This is what the file should look like /etc/initscript Code:
ulimit -Hn 1048576 |
Quote:
A prime example of this style is /etc/profile.d/. We could have everything in a massive profile script (which /etc/profile is still used, but this does help simplify it), but if you break things out into individual files, it can help you maintain them. For a semi-unrelated note, /etc/sysctl.conf has been deprecated in systemd, but still works with procps-ng that we use in Slackware. |
Quote:
|
All times are GMT -5. The time now is 03:45 PM. |