Received-SPF: pass (Last token {ip4:66.102.92.155} (res=PASS)) client-ip=66.102.92.155; envelope-from=<jeff@wtccommunications.ca>; x-ip-name=mail-fw.wtccommunications.ca;
X-Received: from mail-fw.wtccommunications.ca (mail-fw.wtccommunications.ca [66.102.92.155])
by netwin.co.nz (SurgeMail 7.3p) with ESMTP id 8417182-1391920
for <surgemail-list@netwin.co.nz>; Sat, 16 Feb 2019 16:05:37 +0000
X-Return-Path: jeff
X-ASG-Debug-ID: 1550332968-08fa0305294307a0001-doDeKA
X-Received: from exchange.wtccommunications.ca (exchange.wtccommunications.ca [66.102.92.241]) by mail-fw.wtccommunications.ca with ESMTP id mtCctXr0PgRoopyB for <surgemail-list@netwin.co.nz>; Sat, 16 Feb 2019 11:02:48 -0500 (EST)
X-Barracuda-Envelope-From: jeff@wtccommunications.ca
X-Barracuda-Effective-Source-IP: exchange.wtccommunications.ca[66.102.92.241]
X-Barracuda-Apparent-Source-IP: 66.102.92.241
X-Received: from WTC-EXCHANGE.wtc.local ([fe80::75bb:a149:9d6f:1f51]) by
wtc-exchange.wtc.local ([fe80::75bb:a149:9d6f:1f51%11]) with mapi; Sat, 16
Feb 2019 11:02:48 -0500
From: Jeff Crowe
To: "surgemail-list@netwin.co.nz" <surgemail-list@netwin.co.nz>
Date: Sat, 16 Feb 2019 11:02:46 -0500
Subject: Re: [SurgeMail List] Max thread value?
Thread-Topic: [SurgeMail List] Max thread value?
X-ASG-Orig-Subj: Re: [SurgeMail List] Max thread value?
Thread-Index: AdTGEQ8Y6yhKSOJtTuCtuV0Vv1roOA==
Message-ID: <C7A660EA-433C-40AF-BDAA-D8176B2421F7@wtccommunications.ca>
References: <5c5df182.7d4a.6a3df700.41c796b6@netwin.co.nz>
In-Reply-To: <5c5df182.7d4a.6a3df700.41c796b6@netwin.co.nz>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
MIME-Version: 1.0
X-Barracuda-Connect: exchange.wtccommunications.ca[66.102.92.241]
X-Barracuda-Start-Time: 1550332968
X-Barracuda-URL: https://mail-fw.wtccommunications.ca:443/cgi-mod/mark.cgi
X-Virus-Scanned: by bsmtpd at wtccommunications.ca
X-Barracuda-Scan-Msg-Size: 17727
X-Barracuda-BRTS-Status: 1
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=7.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.67442
Rule breakdown below
pts rule name description
---- ---------------------- --------------------------------------------------
0.00 HTML_MESSAGE BODY: HTML included in message
X-Originating-IP: 66.102.92.155
X-Country: code=CA country="Canada" ip=66.102.92.155
X-ORBS-Stamp: hostkarma_yellow
X-Rcpt-To: <surgemail-list@netwin.co.nz>
X-SpamDetect: *********: 9.9 sd=9.9 lv=13.00 nok=0/1 m=1 nf=0 Close 0.04(X-myrbl:Color=white) 0.90(X-Phrase:isspam) 0.25(X-Country:canada) 0.35(X-Verify-Helo:+OK) 0.63(X-NotAscii:us-ascii) 0.43(spfpass) 0.45(X-LangGuess:English) 0.46(X-ORBS-Stamp:yellow) 0.48(CountryTLD) Lowered 11.0 Sval 2.4 bsan 11.0 NotSaned s=2.4 was=11.0 Sval 2.4,rx:myrblwhite
X-NotAscii: charset=us-ascii
X-LangGuess: English
X-Probe: +OK skipped, known ip address
X-Phrase: IsSpam score=1.00
X-Verify-Helo: +OK mail-fw.wtccommunications.ca
X-MyRbl: Color=White Age=543 Spam=3 Notspam=0 Stars=965790 Good=76709506 Friend=18102339 Surbl=84056 Catch=0 r=0.0048 ip=66.102.92.155
X-IP-stats: Incoming Outgoing Last 0, First 536, in=607, out=96, spam=0 Known=true ip=66.102.92.155
List-Unsubscribe: <mailto:surgemail-list-leave@netwin.co.nz?subject=unsubscribe>
X-Mailing-List: surgemail-list@netwin.co.nz
List-ID: <surgemail-list@netwin.co.nz>
Precedence: bulk
Reply-To: surgemail-list@netwin.co.nz
Content-Transfer-Encoding: quoted-printable
Content-Transfer-Encoding: quoted-printable
Hi Chris,
I have increased the max_thread to 2000 but see that it will only support 1023 threads:
Sending 0: Threads 230/1023, Peak Links 1006, smtp=3, pop=40, imap=515 (360 idle), web=9, send=0, misc=0
Send channels
Here is my surgemail_start.sh as well as the output from ulimit -a. Any suggestions where to increase the limits to support more connections? (running on Debian 9 with the default ulimit settings).
surgemail-2:/opt/surgemail# more surgemail_start.sh
#!/bin/sh
# allow core dumps
ulimit -c unlimited
# file handle limit
ulimit -n 4096
# stack size limit
ulimit -s 1000
cd /opt/surgemail
./startmail
surgemail-2:/opt/surgemail# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 15792
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 15792
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Thanks
Jeff Crowe
WTC Communications
The limit depends mostly on your load which will depend on user habbits and disk performance, then gpu and mem. So there is no rule of thumb, however, basically, it's a limit you can safely set to 2000 so start with that.
Also set
g_imap_idle_free "true"
g_imap_inactive_free "true"
which lets surgemail avoid using real threads when not needed.
If going above 2000 you may need to adjust the limit command in the surgemail_start.sh script,
ChrisP.
On Saturday 09/02/2019 at 4:22 am, Jeff Crowe wrote:
Hi all,
What are you running the max threads value (g_thread_max) on the server? I currently am getting steady reports like this:
Thread limit issue, examine status.threads to find cause of issue links=870 max=1000
The majority of the connections are from IMAP clients, then warnings get hit when we have pop bursts from customers who run servers that check 50 or so accounts at once.
Thanks
Jeff Crowe
WTC Communications