Go
back to previous topic |
Forum Name |
"What Does RL Stand For?" |
Topic subject | Sockets. CF limit on connections? |
Topic
URL | https://forums.carrionfields.com/dcboard.php?az=show_topic&forum=43&topic_id=975 |
975, Sockets. CF limit on connections?
Posted by TheDude on Wed 31-Dec-69 07:00 PM
I am generally curious, how many connections could CF realistically handle, in terms of it's server's socket connections?
I ask because I am doing some load testing on a c++ socket server I'm writing (totoally non-mud related) and am wondering what sort of numbers the mud server could physically theoretically handle before connections started getting blocked (as a comparison); I'm hoping to get an answer independent of what overall program memory might allow, for simplicity's sake.
Also, what platform is CF run on?
|
978, RE: Sockets. CF limit on connections?
Posted by Isildur on Wed 31-Dec-69 07:00 PM
IIRC it runs on Solaris. Which probably means the OS isn't the limiting factor on how many simultaneous connections it can handle.
I think the theoretical max for TCP/IP is 65535.
|
979, I thought every socket was a file descriptor on Solaris
Posted by Theerkla on Wed 31-Dec-69 07:00 PM
Which would mean there's a configuration setting that limits how many open sockets you can have assuming you haven't altered the defaults.
|
980, RE: I thought every socket was a file descriptor on Solaris
Posted by Isildur on Wed 31-Dec-69 07:00 PM
That might be the case. When I said the OS isn't the "limiting factor", I meant that your app is more likely to have a problem adequately handling pathologically large numbers of sockets than Solaris is. (This, contrasted with Windows, which sort of barfs when you try to open too many sockets, or open & close them at too high a frequency).
|
981, Thanks. Both of you seem to be on it.
Posted by TheDude on Wed 31-Dec-69 07:00 PM
I'm running on Mac OS X right now. Theerkla's correct- the sockets are file descriptors and there's a setting to up the default from, I believe, 512. Supposedly the default is dynamically upped when more sockets are requested, but I've not gotten my server to handle more than a hard limit of ~500. No worries though, this is plenty for now so I haven't forced the issue.
And yep Isildur, my whole world starts slowing down when I reach the limits so I'm keeping it under 500 until if and when I need to boost my hardware/code to accomodate. It's a CPU cycle bottleneck with some 500 threads going on (i.e. my application/hardware) not a socket issue, per se. So at the end of the day I've got a strong feeling that my code/hardware's going to be the limiting factor, not the socket limitations..as you warned. I'm happy with that.
Thanks!
(still curious how many connections CF could handle though, har).
|
982, Probably aren't going to get that info about CF
Posted by Tac on Wed 31-Dec-69 07:00 PM
Since I imagine it could be used in a DoS attack. Not that you would, or that you'd need the info to launch such an attack, but there it is.
|
984, Not really..
Posted by Marcus_ on Wed 31-Dec-69 07:00 PM
If somebody were to try SYN flooding cf (i.e. opening sockets until cap is reached or all resources are drained), it's a different number than the actual max number of connections.
In those kinds of DoS attacks, you spam-create half-open connections until that specific queue is filled up, and it becomes difficult for new players to connect. The already connected players can, however, stay on. So there's a specific number for half-open connections.
As for the original question: Depends on what OS the cf box is running. If it's solaris, there are two possibilities: 32-bit solaris = 256 connections 64-bit solaris = 65k limit by OS
The server probably runs either solaris 64 or linux, which would put max connections somewhere in the 5-digit range (guesstimation).
|
985, RE: Not really..
Posted by Isildur on Wed 31-Dec-69 07:00 PM
That's a DoS against the box on which CF runs. A DoS against CF would be to create a bunch of level-1 characters until the mud code either crapped out or started rejecting new logins.
|
995, But that would be multiplaying, which is wrong and against the rules :( nt
Posted by Marcus_ on Wed 31-Dec-69 07:00 PM
yeah yeah it's bad
|
983, RE: Thanks. Both of you seem to be on it.
Posted by Isildur on Wed 31-Dec-69 07:00 PM
Are all the sockets active? It's surprising that your server would completely bog down as you approach the limit unless it's an OS issue.
Are you polling them in a tight loop? If so, that's probably a bad idea. If you're not already, try using something like select(), which blocks until some number of your sockets are ready for reading. When it returns, you service those sockets that are ready, then call select() again.
Check out the man page. (I'm assuming OSX comes with man pages.)
|