-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bob,
On 11/1/13, 7:57 PM, Bob DeRemer wrote: > > >> -----Original Message----- From: Christopher Schultz >> [mailto:ch...@christopherschultz.net] Sent: Friday, November 01, >> 2013 6:11 PM To: Tomcat Users List Subject: Re: attempting to >> achieve 100K concurrent websocket connections on Tomcat 7.0.48 >> NIO >> > Bob, > > Just a quick note: with NIO, you should not need 100k threads to > serve 100k connections. Can a single process even request 100k > threads from the OS under your current environment? > > >> Hi Chris, > > As for a single client requesting 100K, no. There's a limit to the > number of ephemeral ports outbound, but 40 - 50K is definitely > doable per machine. I'm talking about threads, not connections. I don't doubt you could do that many connections (though you might need a bit of TCP/IP-stack-tuning to allow that many /concurrent/ connections). I'm concerned that your user is not permitted to start that many threads and/or processes. You would be getting a different error, though, in that case (likely "OutOfMemoryError: Cannot allocate a new thread" or something like that). Ideally, you won't need anywhere near 100k threads to handle 100k connections: that's the whole point (okay, well, half) of Websocket-style communication of course. > We'll try setting maxThreads = -1 (like Mark mentioned), just to > see how it works. With regard to machines, the client and server > are both BIG EC2 instances with 16 vCPUs and 60 GB RAM. We were > able to get 2 client machines, each running 1 java process > simulating 40K websocket clients, connected to 1 Tomcat server > instance - so 80K concurrent connections. It just seems that if we > hit it too hard all at once, there are problems and we can't quite > determine what's at the root of it. Interesting. That you can't apply the load all at once would indicate a threading issue in Tomcat... otherwise things would just be slow at the start of the test and then speed-up as the load smoothed-out. I haven't yet read Mark's replies... he's likely got something fixed already ;) - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSdPz0AAoJEBzwKT+lPKRYttEP/RJCdC55J1ZpNNrPyN/zgEkj p1AHYN/cMZoaBKjgS88tp++Lw8ewFrcnebja2Zfm4Exekg73/F0YACyPeC5i71JC brIIjJD8nN9ycbQ7k9hjYCTn1soxfKy/LvAgpkame1qD9QHIEUqF2h2ptyjwkYWu 3J1vLlA4ixHcUAVyvHGzKUvK/PvMwV57I2Y6QzIcENJK8QZIasE24bNB82JsK407 +As2txOfOqWT+73asxsYPKlcu+sLOeGbvfLLmCpy8nQXd3hJcWWxt6XeSj6LGqmD SntfVXEeeIY+nvTHlMsb+uY7aJmETk0q06T9T1hn/1fRUg3fhpNx/inzjr1+TVmt cYMaSFPuXKHOVrG9eHihzA6AhY8jIQWARykpiQWUZvNcn/hhr7qV7IvpyCl5DL6F 1LzwhnNRQQJ9XsOAqPeXTv9XLYEDTf3EDAnsJWrFVeuNwvTNtuyQoCiOJGDWyXFd cX8ZnpKEEGC4U4493hG+0SSch8BwcuSwubH8LEspRAhbQneu456w1glJjsJIUgg0 GmeTCwpEP2oJhjV1GUCKxomJCCN8ZsEPBozKrecZNP3xg7Ul/Fo7dhXxOrDnc6jr Sypv3mERTaMVREqzbtNhJJPI5HVqlS3eaDjdm+UtWv1mfn7TKv0q7Q1mFUo/rHSh aktcBF5/vNOiBhLTUU59 =Vh4W -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org