Author Topic: TNServer runs much slower with multiple cores on linux  (Read 909 times)

lance

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
TNServer runs much slower with multiple cores on linux
« on: March 26, 2018, 03:16:00 AM »
I am starting to deploy my program to linux server. I found it is much slow when run on multi-core servers with mono.
With single core server, I can forward 30k packets per second. While on a quad-core server, I can not do that. On windows server, it also can forward 30k packets per second with multi-core cpu.
So what should I do with linux multi-core server? Some magical switch I should turn on?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,152
  • Toronto, Canada
    • View Profile
Re: TNServer runs much slower with multiple cores on linux
« Reply #1 on: March 26, 2018, 05:49:44 AM »
I'm not aware of anything related to this, so can't say. I don't do anything special.

lance

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: TNServer runs much slower with multiple cores on linux
« Reply #2 on: March 26, 2018, 06:35:33 AM »
Have you done performance test on Linux server? How do performance on linux server compare to windows server? thanks!

I'm not aware of anything related to this, so can't say. I don't do anything special.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,152
  • Toronto, Canada
    • View Profile
Re: TNServer runs much slower with multiple cores on linux
« Reply #3 on: March 29, 2018, 11:52:17 AM »
I expect Windows to work faster, since it uses IO Completion ports, which is a Windows feature. Plus, on Windows it runs using .NET, while on Linux it runs through Mono.

Windows will win.

lance

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: TNServer runs much slower with multiple cores on linux
« Reply #4 on: March 31, 2018, 08:06:00 AM »
Hi, I found some very funny stuff. I tried build the code with vs2017 and .net core 2.0 target. And it actually worked! On linux with dot net core!
I thought tnet only support mono, apparently I was wrong. Maybe dot net core will run faster than mono?

I expect Windows to work faster, since it uses IO Completion ports, which is a Windows feature. Plus, on Windows it runs using .NET, while on Linux it runs through Mono.

Windows will win.

lance

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: TNServer runs much slower with multiple cores on linux
« Reply #5 on: March 31, 2018, 10:04:38 AM »
The dotnet core version of tnet server only utilize one cpu on both windows and linux system... Maybe it would run much faster if it support multiple cpus with dot net core 2.0.