Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#57174 - [mongodb] Implement vendor recommended settings

Attached to Project: Community Packages
Opened by Giacomo Longo (g4b1bb097) - Saturday, 20 January 2018, 20:35 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 23 April 2019, 15:35 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Here at https://docs.mongodb.com/manual/reference/ulimit/ the vendor recommends including in this service file ( https://git.archlinux.org/svntogit/community.git/tree/trunk/mongodb.service?h=packages/mongodb ) these options under [Service]:

LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=64000
LimitNPROC=64000

Can they be added?

This task depends upon

Closed by  Antonio Rojas (arojas)
Tuesday, 23 April 2019, 15:35 GMT
Reason for closing:  Won't fix
Additional comments about closing:  mongodb has been dropped
Comment by loqs (loqs) - Saturday, 20 January 2018, 23:20 GMT
LimitFSIZE=infinity LimitCPU=inifinity LimitAS=inifinity are these not the current default values?
LimitNPROC=64000 is the current default not 63026 LimitNOFILE=64000 is current default not 16384?
Would that not mean only the addition of LimitNOFILE would have a significant impact on a default installation.
If the service file is to be altered is mongodb incompatible with every systemd protection option such as PrivateTmp ProtectHome ProtectSystem?
Comment by Giacomo Longo (g4b1bb097) - Sunday, 21 January 2018, 09:00 GMT
These are the contents of /proc/<PID>/limits of a new mongodb istance created by pacstrapping and entering into it with systemd-nspawn

Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 63462 63462 processes
Max open files 1024 4096 files
Max locked memory 16777216 16777216 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 63462 63462 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us

The only differences between vendor and our limits are:
- Maximum processes(even if by a small amount)
- Maximum open files(The biggest difference)

I don't think that changing limits inside the service file should have any effect on systemd namespacing and sandboxing capabilities.

Comment by BrLi (brli) - Monday, 12 March 2018, 13:29 GMT
there are systemd mongodb.service unit files and mongodb.conf files in mongodb-src-r3.6.3/{debian,rpm}

I think they are for the deb-based and rpm-based distro respectively.

Perhaps you should consider install one of the set to our $pkgdir rather than maintain our own?

ps. the new mongodb.conf uses YAML format whereas ours is out of date and won't work.
Comment by Eli Schwartz (eschwartz) - Monday, 12 March 2018, 16:45 GMT
Maybe mongodb should move these and other Debian packaging files to a distribution-agnostic directory and install them automatically. :p

Those manpages also look like they could be useful I guess. And likewise the mongod.conf

Loading...