neels has uploaded this change for review.

View Change

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
---
M contrib/systemd/osmo-hnbgw.service
M doc/manuals/chapters/running.adoc
2 files changed, 37 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/77/35177/1
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 @@
[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 @@
configure a distinct point-code, see <<configure_iucs_iups>>.


+=== 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]]

To view, visit change 35177. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I5333765199cf9e3e5a570f85b85d2b7423d34a4d
Gerrit-Change-Number: 35177
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: newchange