The file_descriptors configuration variable causes EM.set_descriptor_table_size to be called, which (at best) merely sets the NOFILE rlimit. Since the soft limit is usually set to the hard limit already, the hard limit can only be raised by root (or someone with CAP_SYS_RESOURCE -- and does anyone use capabilities?), and anyone running agents as root needs their head examined, the most likely outcome of setting file_descriptors is that NOFILE will either be unchanged (if file_descriptors is greater than or equal to NOFILE), or else it will be lowered (if file_descriptors is less than NOFILE).
All of this would just be a funny little anecdote about why you shouldn't use configuration parameters whose purpose you don't understand, except that the default for file_descriptors is 1024. This means that on any system which has deliberately increased the NOFILE limit, agents won't get the benefit of this change with a default smith configuration.
I'd strongly recommend making the default for this parameter be nil, and not call EM.set_descriptor_table_size if the value for the parameter is nil. Personally, I'd just remove the config parameter entirely, since only crazy people running agents as root (and the three people on earth who use capabilities) are likely to get any benefit from it.
Given how little I apparently understand I'm eternally grateful that you have deemed it worthy to tell me of my failings. So I have bowed down to your infinite knowledge and removed as you suggested.
The
file_descriptors
configuration variable causesEM.set_descriptor_table_size
to be called, which (at best) merely sets theNOFILE
rlimit. Since the soft limit is usually set to the hard limit already, the hard limit can only be raised byroot
(or someone withCAP_SYS_RESOURCE
-- and does anyone use capabilities?), and anyone running agents as root needs their head examined, the most likely outcome of settingfile_descriptors
is thatNOFILE
will either be unchanged (iffile_descriptors
is greater than or equal toNOFILE
), or else it will be lowered (iffile_descriptors
is less thanNOFILE
).All of this would just be a funny little anecdote about why you shouldn't use configuration parameters whose purpose you don't understand, except that the default for
file_descriptors
is 1024. This means that on any system which has deliberately increased theNOFILE
limit, agents won't get the benefit of this change with a default smith configuration.I'd strongly recommend making the default for this parameter be
nil
, and not callEM.set_descriptor_table_size
if the value for the parameter isnil
. Personally, I'd just remove the config parameter entirely, since only crazy people running agents as root (and the three people on earth who use capabilities) are likely to get any benefit from it.