Search Unity

IO performance comparison for Windows/OSX/Linux headless / batchmode Unity servers?

Discussion in 'Multiplayer' started by attiksystem, Nov 13, 2012.

  1. attiksystem

    attiksystem

    Joined:
    Aug 21, 2012
    Posts:
    23
    Hi,

    After reading this thread, I was wondering if there was somewhere some kind of benchmark that would show the performance of the IO for a Unity 4.0 headless server, for the different OSes under which it could run.

    IOCP seems to be a way of doing high performance IO, but is only available for Windows. GIO, on the opposite, seems to be a way of getting good performances for Linux, maybe OSX. How do these technologies compare to each other?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    What kind of use case do you have that would be impacted by faster or slower IO without being impacted by Unity mono limitation significantly earlier already?
     
  3. attiksystem

    attiksystem

    Joined:
    Aug 21, 2012
    Posts:
    23
    Hi,

    Behind my post, there were actually two questions:

    1) Is it reasonable to consider hosting under Linux a Unity 4.0 headless server (without physics calculations, just information routing), and if yes, is it as much efficient as with a Windows host? I could imagine such a server being IO-Bound, with mono socket implementation as the main bottleneck. But I might be wrong!

    2) I'm trying to figure out how to hook up a server farm, with distributed software written maybe in different languages, to a big network of mobiles running a Unity 4.0 app. Instead of using a commercial solution, or doing my own TCP protocol (which you suggested in a previous answer), I was wondering if it was a viable solution to use a Unity 4.0 headless server a some sort of gateway between the mobiles and the farm, and use the lidgren library in between. Again, such a server would certainly be IO-Bound.

    Thanks for you time, bye!

    Philippe Lang
     
  4. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Depending a bit on what you do, and assuming a decent implementation, you're most likely going to be CPU bound as Unity pretty much is built for a single threaded environment. I obviously do not know you real use case, so maybe you actually are I/O bound, all I'm saying is - don't assume this.

    Also, if you're merely using it as a pass-thru service, then writing a stand-alone server will most likely be way more efficient.
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    I agree, chances that you are network bandwidth or cpu bound are much higher than that you will be IO bound, especially when you want to scale that horizontally, where you would need threading to handle all the traffic for the in-cluster network communication etc.
    Tackling it only from Unity might as such become a problem in itself and you will likely want to offload at least the pure relay and cluster management part to technology thats suited for this purpose like Retlang


    Assuming that you will use Unity for more than pass through in the future: did you consider to use uLink from MuchDifferent with its scaling technology which saves you all that headache while adding even more to your pool of available technology or even PikkoServer, both to get the 'scaling management' out of Unity into technology thats more suited for it?

    Assuming that it will really just be passthrough: I fully agree with fholm, just use lidgren and build a native mono / MS .NET console application depending on the platform. The MS build would definitely be much faster as mono is much slower on this front unluckily.
     
  6. attiksystem

    attiksystem

    Joined:
    Aug 21, 2012
    Posts:
    23
    Isn't there a way of doing things the "node.js" way, in an evented and non-blocking fashion, within a single thread? I thought your SlimIOCP project was going in this direction...

    This was my initial idea, but staying within the Unity environment would keep me away from so many trouble, I wanted to give it a try. And by the way, uLink networking library works that way, if I'm not wrong. But maybe they did this just to be able to do physics on the server.

    If I wanted to host lidgren in a stand-alone server, would you recommend me doing this under Windows, or is it reasonable to do it under Mono/Linux?
     
  7. attiksystem

    attiksystem

    Joined:
    Aug 21, 2012
    Posts:
    23
    I did consider it! But to be honest, I don't like being that much dependent from someone else's technology. I prefer having a subset I master completely. 2 days ago, I made a test run with uLink between OSX and IOS, and had a strange problem with it. I asked a question in their forum, and today my question has been watched 10 times, and of course no answer. This is a situation I'd like to avoid, if possible...

    This answered my question, regarding Linux hosting. Thanks!

    A question for you both: if you were in charge of designing the networking and backend of a game like "Curiosity" from 22cans. What would you come up with?
     
  8. lgentry

    lgentry

    Joined:
    Nov 19, 2012
    Posts:
    6
    Unity 4.0 is our biggest release to date. It brings you all new powerful features never before seen in Unity, such as:

    Mecanim, the new animation system to animate any character or object
    Real-time shadows for all platforms
    DirectX 11 rendering
    Shuriken particle system updated with world collision functionality
    Adobe Flash and Linux as two new platforms
    Cross-platform dynamic fonts

    And of course, many more new features and updates. Keep reading to learn more
     
  9. attiksystem

    attiksystem

    Joined:
    Aug 21, 2012
    Posts:
    23
    I'm convinced Unity 4.0 Pro is great, since I bought it, but what is the reason of posting this in a thread related to "IO performance comparison for Windows/OSX/Linux headless / batchmode Unity servers?"