During load testing or desktop creation we're noticing many smbd processing that appear to be kept open by open tcp connections. (My understanding is that these processes should die quickly but instead they persist for about 2 hours). These processes continue to increase in number and use up memory during a stress test because they only begin to die 2 hours into the test. Questions are: - Is there something in (or missing from) samba configuration that would explain this? A connection timeout, keepalive etc. - Or is this expected behaviour that these would remain open for so long - even to powered-off machines? Thanks, Jake
Am 25.02.21 um 20:01 schrieb Yakov Revyakin via samba:> During load testing or desktop creation we're noticing many smbd processing > that appear to be kept open by open tcp connections. (My understanding is > that these processes should die quickly but instead they persist for about > 2 hours). These processes continue to increase in number and use up memory > during a stress test because they only begin to die 2 hours into the test. > Questions are: > - Is there something in (or missing from) samba configuration that would > explain this? A connection timeout, keepalive etc. > - Or is this expected behaviour that these would remain open for so long - > even to powered-off machines?net.netfilter.nf_conntrack_tcp_timeout_established https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt nf_conntrack_tcp_timeout_established - INTEGER (seconds) default 432000 (5 days)
Mandi! Yakov Revyakin via samba In chel di` si favelave...> - Is there something in (or missing from) samba configuration that would > explain this? A connection timeout, keepalive etc.I use in [globals]: socket options = TCP_NODELAY TCP_KEEPIDLE=240 TCP_KEEPCNT=4 TCP_KEEPINTVL=15 to have 5 minutes idle time. Seems strange to me '2 hours', the default, you can look at in: /proc/sys/net/ipv4/{tcp_keepalive_time,tcp_keepalive_probes,tcp_keepalive_intvl} are 1 hour, AFAIK. -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/ Polo FVG - Via della Bont?, 7 - 33078 - San Vito al Tagliamento (PN) marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797 Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA! http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000 (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)