Quote:
Originally Posted by Krytain
Also, does anyone have any success with getting this to run on linux? I noticed in /include/ there is a linux.h file, but honestly I don't know much about compiling C++ on linux.
Any feedback or suggestions would be appreciated. I plan on staying up to date with the project and contributing where I can when i get some free time to overview some of the current code.
|
A Linux version is possible with a few changes - you would at least have to strip out everything concerning the profiling window, as the functions that create/manage it are Windows-specific. You would also have to change some of the networking components, as Winsock ("Windows Sockets") is not available on Linux - most of this change would consist of including the right headers and making sure some function calls are getting the right arguments.
The good news is that the thread management and synchronization, as most of these components are taken from the Linux pthread libraries. The bad news is that the system limits for semaphores are quickly exceeded due to the number allocated per entity. The same goes for threads. My suspicion is that the reason current servers pop up and die out quickly is that with more than 50 people on, the system starts thrashing threads because they're all driving an object currently in use (none can be cached out). That contributes to the contention problem, and general unresponsiveness of the server.
Moving to Linux would not be a quick fix for these issues. So to that end I've had some discussions with other developers and I'm in agreement that IO Completion Ports are the way to go for the future, even if it makes porting to Linux in the future more difficult. This will mainly affect networking, but as far as reducing the overall number of threads the server has to start & use I think a fairly minor change can simplify much of the system. Sorry I have to be vague about this one, but it needs a lot more testing.