From 90928fb2467aef2b2b8419c1c96f7edae6fc2907 Mon Sep 17 00:00:00 2001 From: Neels Janosch Hofmeyr Date: Thu, 30 Nov 2023 18:13:06 +0100 Subject: [PATCH] systemd,manual: set LimitNOFILE=65536 A typical OS imposed limit is 1024 open FD, which is too low when there are thousands of HNB. In systemd service file, set a super high limit of 65536. In osmo-hnbgw's user manual, add section 'Configure limits' describing this in detail. Related: OS#6256 Related: osmo-bsc I26c4058484b11ff1d035a919bf88824c3af14e71 Change-Id: I5333765199cf9e3e5a570f85b85d2b7423d34a4d --- contrib/systemd/osmo-hnbgw.service | 1 + doc/manuals/chapters/running.adoc | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/contrib/systemd/osmo-hnbgw.service b/contrib/systemd/osmo-hnbgw.service index ba41e24..2307bcc 100644 --- a/contrib/systemd/osmo-hnbgw.service +++ b/contrib/systemd/osmo-hnbgw.service @@ -6,6 +6,7 @@ Wants=network-online.target [Service] Type=simple Restart=always +LimitNOFILE=65536 StateDirectory=osmocom WorkingDirectory=%S/osmocom ExecStart=/usr/bin/osmo-hnbgw -c /etc/osmocom/osmo-hnbgw.cfg diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 45d9b2f..08e1b87 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -76,6 +76,23 @@ To run multiple OsmoHNBGW instances on the same SCCP routing, each HNBGW has to configure a distinct point-code, see <>. +=== Configure limits + +When connecting hundreds of HNB to OsmoHNBGW, it may be necessary to adjust the +operating system's limit on open file descriptors for the osmo-hnbgw process. A +typical default limit imposed by operating systems is 1024; this would be +exceeded by, for example, about 1024 HNB on Iuh, 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-hnbgw, which practically rules out failure from running out of file +descriptors anywhere (<50,000 HNB). + +When using systemd, the file descriptor limit may be adjusted in the service +file by the `LimitNOFILE` setting ("Number of Open FILE descriptors"). +OsmoHNBGW ships a systemd service file with a high LimitNOFILE setting. + + === Configuring Primary Links [[configure_iucs_iups]]