5 ms·
Background of Linux's "file-max" and "nr_open" limits on file descriptors (2021)
- pixl97 2y ago>Specifically on Linux there are two system-wide sysctls: fs.nr_open and fs.file-max. (Don't ask me why one uses a dash and the other an underscore, or why there are two of them...) Somewhere it should be lore that the person that named these syscalls went on to name functions in PHP.
- quectophoton 2y agoThe creat(3) tradition lives on.
- AdamJacobMuller 2y agoThat extra "e" would represent a 20% bloat in the functions name, bytes aren't free you know.
- hermitdev 2y agoAnd yet people will die on a hill defending using X number of spaces instead of a single tab for indentation (where X is some positive integer, usually 2, 3, 4, or 8), with zero regard for the bytes wasted.
- TeMPOraL 2y agoThis is what happens when you reject S-expressions as the only true form of syntax. People will keep arguing all kinds of nonsense, for the same reason that in logic, falsehood can be followed by anything you want.
- wahern 2y agoDifferent people? Original C and Unix software projects used hard tabs for indentation, and that carried forward into the age of the BSDs. Almost all Unix ecosystem software was tab-indented until relatively recently. Some GNU projects were notable early exceptions, though using spaces for indentation was the least objectionable aspects of their indentation style, and more understandable in that context. By my recollection, it was the increasing popularity of C++ in the 2000s, which was at that time centered around Windows stylistic culture, that initially brought the proliferation of soft tabs to Unix/Linux, followed shortly by the Python community, which for whatever reason gravitated toward soft tabs notwithstanding the earlier preference (including that of Guido) for hard tabs. It's not obvious in modern editors or code browsers, but the Linux kernel, much (most?) of the base Linux user land, and the various *BSD projects (kernel and user land) still use hard tabs for indentation.
- cassepipe 2y agoWhat doe NR stand for ?
- rotifer 2y agoProbably NumbeR.
- foresto 2y agoI've seen it used for (the local equivalent of) "number" in various countries.
- turndown 2y agoSeems to be “normal resources”, where normal probably meant file descriptor based.
- cassepipe 2y agoWhere did you find that info ? I am asking because I tried to write to basic nasm programs in order to learn and I used the c preprocessor (cpp) over my nasm files to take advantage of the libc macros from <sys/syscall.h> and they were all of the form __NR_syscall Then the other responses' assumption, "NumbeR", seems correct
- mh- 2y agoIt's NumbeR. I don't have an authoritative source other than e.g. [0], but I was around (IRC, mailing lists) when some of these were created. [0]: https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/sysctl/fs.rst#nr-open https://github.com/torvalds/linux/blob/master/Documentation/...
- turndown 2y agoI’m wrong. Fourth paragraph from the bottom, last sentence they say “normal resource limits.” I thought that meant “the limit of something called normal resources” not the normal amount of the resource’s limit. Probably because I was trying to find out the exact same question as OP and thought that was it when I read it. I wish articles explained names more specifically sometimes…