
Originally Posted by
thiefmn6092
Hi, i am going to just throw out a few small tips to optimize your code. Unfortunately, with the way this community works, it takes a great deal to get people to use anything outside of what they know and then the transition period takes to long ( for example, with the #508 r client ). There are a few things you can do that take little to no skill to really improve the performance of your server.
1. Don't use Windows! I'm not saying this because of the typical stereotype that Windows "sucks" and all of that. A great amount of time is spend inside of native code using system calls with Runescape servers. Windows does not have the available functions like Linux, Unix and other operating systems do that are cheapeand most of the time, free to use entirely. Windows also has only one function for detecting the status of sockets, "select". "select" is known to not scale well with a high number of active sockets. Linux and Unix systems offer calls such as "poll", "epoll" and "kqueue" which are all implemented differently and generally are better. "poll" is not that big of an improvement over "select", though. Using these different Operating Systems usually means ( especially in the server virtual machines case ) the Java Virtual Machine uses these system functions to implement libraries such as "nio". One more thing, do not even bother trying to say Windows is not bad when you have completion ports ( which is another way of doing multi-threaded IO ) as they are not very good either.