neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35178?usp=email )
Change subject: systemd,manual: set LimitNOFILE=65536 ......................................................................
systemd,manual: set LimitNOFILE=65536
A typical OS imposed limit is 1024 open FD, which can bee too low when there are hundreds of concurrent voice calls.
In systemd service file, set a super high limit of 65536.
In osmo-mgw's user manual, add section 'Configure limits' describing this in detail.
Related: OS#6256 Related: osmo-bsc I26c4058484b11ff1d035a919bf88824c3af14e71 Change-Id: I46512517bc3b5bb90cac7643e7ac73afba398d36 --- M contrib/systemd/osmo-mgw.service M doc/manuals/chapters/running.adoc 2 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/78/35178/1
diff --git a/contrib/systemd/osmo-mgw.service b/contrib/systemd/osmo-mgw.service index b187e1a..03f40ff 100644 --- a/contrib/systemd/osmo-mgw.service +++ b/contrib/systemd/osmo-mgw.service @@ -5,6 +5,7 @@
[Service] Type=simple +LimitNOFILE=65536 StateDirectory=osmocom WorkingDirectory=%S/osmocom Restart=always diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index c178e31..e3bab4d 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -23,3 +23,20 @@ Disable colors for logging to stderr. This has mostly been deprecated by VTY based logging configuration, see <<logging>> for more information. + + +=== Configure limits + +When servicing hundreds of media endpoints, it may be necessary to adjust the +operating system's limit on open file descriptors for the osmo-mgw process. A +typical default limit imposed by operating systems is 1024; this would be +exceeded by, for example, about 256 active voice calls with 4 RTP/RTPC ports +each, sockets for other interfaces not considered yet. + +It should be ok to set an OS limit on open file descriptors as high as 65536 +for osmo-mgw, which practically rules out failure from running out of file +descriptors anywhere (<16,000 active calls). + +When using systemd, the file descriptor limit may be adjusted in the service +file by the `LimitNOFILE` setting ("Number of Open FILE descriptors"). OsmoMGW +ships a systemd service file with a high LimitNOFILE setting.