HFT: Linux vs Windows

Discussion in 'Automated Trading' started by GreenMan, Sep 13, 2010.

  1. GreenMan


    If every millisecond matters, does Linux have any REAL advantage over Windows when running C++ complied real-time algo-bot?
  2. Big


    Short answer : no. ;-)
    The time needed (and skill) to write efficient, multithreaded, latency critical C++, debug it and make it reliable is just prohibitive.
    Linux itself gives no guarantees to be more performing than windows, and even if it could be, again, the amount of skill and energy to make it so (and maintain it so) will also be non trivial.
    In my experience, the success of such a software will be more dependant on the skill of the people involved, the nature of the algo itself (and the skill of the people designing the algo) and also the time to market for any evolutions (which will be numerous and frequent).
  3. short answer: yes. ;-)

    google linux rtos extensions and network stack configurability and you'll have your answer.
  4. nitro


    The answer used to be a definitive yes. Today, it is probably still yes, but probably not out of the box.

    The nice thing about Linux is you can compile it yourself, and being able to customize it to a particular task as opposed to a general operating system is what is key.
  5. Doesn't Linux have about 1% of the market... rebels and geeks? How could it be significant in the landscape of things?

    Even if it's the "greatest thing since sliced bread", how important is it going to be to the general population of computer users?
  6. The general population of computer users is not interested in taking advantage of millisecond matters, for real time algos or anything else.
  7. Reasons will differ, but I think that the majority of practitioners in the "every millisecond matters" arena are using Linux for the systems that handle their trading.
  8. Big


    1% of the market share may not seem like much, but when that 1% is a handfull of Multi Billion Dollars a year Investment banks with more money than sense, I would take 0.001% of that market share even if that meant saying goodbye to the other 99.999% ;-)
  9. How much slower is C# than C++ as it's much easier to program?
  10. Big


    It is on a case by case basis.
    new() in C# is faster than new() in C++ for example.
    Generally speaking, you need to benchmark your particular scenario.
    I wouldn't be surprised if C# were on some cases 30% slower than C++. but when you benchmark it, you will see that you spend about 300% more time developing the same (simple) algo in C++ than in C#.
    C# is also easier to profile and debug performance related issues for example.
    One big drawback of C# for millisecond-dependant algos is the Garbage Collection. There are ways around that though, like ObjectPools.
    #10     Sep 15, 2010