AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Linux kernel tuning11/7/2023 ![]() It didn’t print any exceptions or die gracefully-it was killed. We watched the numbers go up and up without a hitch until, seemingly randomly, the Java server fell over. ![]() We also had to fire up a number of other EC2 instances to act as clients. We first wanted to see what sort of numbers we could get on “Small” instances, which are 1.7GB 32-bit VMs. We noticed that we could hit 512,000 with our Java server not even breaking a sweat. We’d fire up the server and run our clients locally to see just how many connections we could hit. We first tested our code on a local Linux box that had Ubuntu 64-bit with 6GB of RAM, connecting with several Ubuntu VMs per client using bridged network adapters so we could ramp up our connections. A number of configurations needed tweaking. To get to these numbers we must consider the Linux kernel itself. Having less for the socket server to do means less code, cpu-usage, and ram-usage. Any communication between the client and server is passed through a queueand processed by a worker. To do this we made the socket servers pretty much just socket servers. Instead of running 100 servers with 10,000 connections each, we’d rather run 2 servers with 500,000 connections apiece. ![]() These principles should apply to just about any Linux platform.įor our usage, squeezing out as many possible socket connections per server is valuable. This guide is specific to Linux and has some information related to Amazon EC2, but it is not EC2-centric. Hitting these numbers was not a trivial exercise so we’re going to share what we’ve come across during our testing. Note: Concurrency, as defined in this article, is the same as it is for The C10k problem: concurrent clients (or sockets).Īt Urban Airship we recently published a blog post about scaling beyond 500,000 concurrent socket connections. Like the idea of working on large scale problems? We’re hiring talented engineers, and would love to chat with you – check it out! ![]()
0 Comments
Read More
Leave a Reply. |