Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: lance on March 26, 2018, 03:16:00 AM

Title: TNServer runs much slower with multiple cores on linux
Post by: lance 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?
Title: Re: TNServer runs much slower with multiple cores on linux
Post by: ArenMook 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.
Title: Re: TNServer runs much slower with multiple cores on linux
Post by: lance 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.
Title: Re: TNServer runs much slower with multiple cores on linux
Post by: ArenMook 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.
Title: Re: TNServer runs much slower with multiple cores on linux
Post by: lance 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.
Title: Re: TNServer runs much slower with multiple cores on linux
Post by: lance 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.