Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The RemotePingPong benchmark of Akka 1.4.1 is slower than Akka 1.3.16 #4329

Closed
ShawnYun opened this issue Mar 12, 2020 · 4 comments
Closed

Comments

@ShawnYun
Copy link

ShawnYun commented Mar 12, 2020

  • Akka.Net version : Akka 1.4.1 and Akka 1.3.16

  • On which platform you are using Akka.Net : Windows 10 x64

  • Question :
    I run the RemotePingPong benchmark test of Akka 1.4.1 and Akka 1.3.16. Then the result is below:
    You can see that 1.3.16 performs better than 1.4.1. This confused me because I saw that 1.4.1 was
    optimized for DotNetty TCP Transport.

    The figure above is 1.3.16 and the figure below is 1.4.1.
    Akka1.3.16
    Akka1.4.1

@ShawnYun ShawnYun changed the title The RemotePingPong benchmark of Akka 1.4.1 is slower than Akka1.3.16 The RemotePingPong benchmark of Akka 1.4.1 is slower than Akka 1.3.16 Mar 12, 2020
@Aaronontheweb
Copy link
Member

We explain the details about the new batching system here https://getakka.net/articles/remoting/performance.html

First round of the RemotePingPong benchmark falls below the default batching threshold of 30 msg / batch and will always fall below it. For real-world use cases where message traffic is really that low, you should do what the article suggests and disable batching.

On my hardware, I consistently get 174,000 msg / s per connection on Akka.Remote using the default settings on rounds 2-6 of the benchmark. Your mileage may vary - looks like on your hardware the I/O batching doesn't make much of a difference. The reasons why that might be: different OS, different hardware, different runtime version (all of our benchmarks target .NET Core 3.1.)

You can disable the batching system in its entirety through configuration; the link I included earlier will show you how.

@Aaronontheweb
Copy link
Member

I also took the liberty of producing a YouTube video today to help explain this in more detail:

https://www.youtube.com/watch?v=mP3amXEntmQ&feature=youtu.be

@Tommo-L
Copy link

Tommo-L commented Mar 16, 2020

I also run the benchmark in my local env. It seems v1.4.1 a little better than v1.3.16.

v1.3.15 benchmark code: https://github.com/akkadotnet/akka.net/releases/tag/1.3.16
v1.4.1 benchmark code: https://github.com/akkadotnet/akka.net/tree/dev/src/benchmark/RemotePingPong

Results:

image

image

image

v1.3.16 config

const long repeat = 100000L;  <--- original is 10000L

v1.4.1 config

var baseConfig = ConfigurationFactory.ParseString(@"
	akka {
  actor.provider = remote
  loglevel = ERROR
  suppress-json-serializer-warning = on
  log-dead-letters = off

  remote {
	log-remote-lifecycle-events = off

	dot-netty.tcp {
		port = 0
		hostname = ""localhost""
		batching{
			enabled = false/true
			max-pending-writes = 30
			max-pending-bytes = 16k
			flush-interval = 40ms
		}
	}
  }
}");

@Tommo-L
Copy link

Tommo-L commented Mar 16, 2020

Sorry, mistake for v1.3.16 configuration. v1.4.1 is a little better than v1.3.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants