Skip to content

Commit

Permalink
Merge pull request #5275 from akkadotnet/dev
Browse files Browse the repository at this point in the history
Akka.NET v1.4.25 Release
  • Loading branch information
Aaronontheweb authored Sep 8, 2021
2 parents 49b2afc + f12e0b0 commit 42061a3
Show file tree
Hide file tree
Showing 73 changed files with 2,090 additions and 530 deletions.
73 changes: 73 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
#### 1.4.25 September 08 2021 ####
**Maintenance Release for Akka.NET 1.4**
Akka.NET v1.4.25 includes some _significant_ performance improvements for Akka.Remote and a number of important bug fixes and improvements.

**Bug Fixes and Improvements**
* [Akka.IO.Tcp: connecting to an unreachable DnsEndpoint never times out](https://github.com/akkadotnet/akka.net/issues/5154)
* [Akka.Actor: need to enforce `stdout-loglevel = off` all the way through ActorSystem lifecycle](https://github.com/akkadotnet/akka.net/issues/5246)
* [Akka.Actor: `Ask` should push unhandled answers into deadletter](https://github.com/akkadotnet/akka.net/pull/5259)
* [Akka.Routing: Make Router.Route` virtual](https://github.com/akkadotnet/akka.net/pull/5238)
* [Akka.Actor: Improve performance on `IActorRef.Child` API](https://github.com/akkadotnet/akka.net/pull/5242) - _signficantly_ improves performance of many Akka.NET functions, but includes a public API change on `IActorRef` that is source compatible but not necessarily binary-compatible. `IActorRef GetChild(System.Collections.Generic.IEnumerable<string> name)` is now `IActorRef GetChild(System.Collections.Generic.IReadOnlyList<string> name)`. This API is almost never called directly by user code (it's almost always called via the internals of the `ActorSystem` when resolving `ActorSelection`s or remote messages) so this change should be safe.
* [Akka.Actor: `IsNobody` throws NRE](https://github.com/akkadotnet/akka.net/issues/5213)
* [Akka.Cluster.Tools: singleton fix cleanup of overdue _removed members](https://github.com/akkadotnet/akka.net/pull/5229)
* [Akka.DistributedData: ddata exclude `Exiting` members in Read/Write `MajorityPlus`](https://github.com/akkadotnet/akka.net/pull/5227)

**Performance Improvements**
Using our standard `RemotePingPong` benchmark, the difference between v1.4.24 and v1.4.24 is significant:

_v1.4.24_

```
OSVersion: Microsoft Windows NT 6.2.9200.0
ProcessorCount: 16
ClockSpeed: 0 MHZ
Actor Count: 32
Messages sent/received per client: 200000 (2e5)
Is Server GC: True
Thread count: 111
Num clients, Total [msg], Msgs/sec, Total [ms]
1, 200000, 96994, 2062.08
5, 1000000, 194818, 5133.93
10, 2000000, 198966, 10052.93
15, 3000000, 199455, 15041.56
20, 4000000, 198177, 20184.53
25, 5000000, 197613, 25302.80
30, 6000000, 197349, 30403.82
```

_v1.4.25_

```
OSVersion: Microsoft Windows NT 6.2.9200.0
ProcessorCount: 16
ClockSpeed: 0 MHZ
Actor Count: 32
Messages sent/received per client: 200000 (2e5)
Is Server GC: True
Thread count: 111
Num clients, Total [msg], Msgs/sec, Total [ms]
1, 200000, 130634, 1531.54
5, 1000000, 246975, 4049.20
10, 2000000, 244499, 8180.16
15, 3000000, 244978, 12246.39
20, 4000000, 245159, 16316.37
25, 5000000, 243333, 20548.09
30, 6000000, 241644, 24830.55
```

This represents a 24% overall throughput improvement in Akka.Remote across the board. We have additional PRs staged that should get aggregate performance improvements above 40% for Akka.Remote over v1.4.24 but they didn't make it into the Akka.NET v1.4.25 release.

You can [see the full set of changes introduced in Akka.NET v1.4.25 here](https://github.com/akkadotnet/akka.net/milestone/56?closed=1)

| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 32 | 1301 | 400 | Aaron Stannard |
| 4 | 358 | 184 | Andreas Dirnberger |
| 3 | 414 | 149 | Gregorius Soedharmo |
| 3 | 3 | 3 | dependabot[bot] |
| 2 | 43 | 10 | zbynek001 |
| 1 | 14 | 13 | tometchy |
| 1 | 139 | 3 | carlcamilleri |

#### 1.4.24 August 17 2021 ####
**Maintenance Release for Akka.NET 1.4**

Expand Down
49 changes: 36 additions & 13 deletions docs/articles/utilities/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@ Akka.NET comes with two built in loggers.
* __StandardOutLogger__
* __BusLogging__

### StandardOutLogger
`StandardOutLogger` is considered as a minimal logger and implements the `MinimalLogger` abstract
class. Its job is simply to output all `LogEvent`s emitted by the `EventBus` onto the console.
Since it is not an actual actor, ie. it doesn't need the `ActorSystem` to operate, it is also
used to log other loggers activity at the very start and very end of the `ActorSystem` life cycle.
You can change the minimal logger start and end life cycle behaviour by changing the
`akka.stdout-loglevel` HOCON settings to `OFF` if you do not need these feature in your application.

### Advanced MinimalLogger Setup
You can also replace `StandardOutLogger` by making your own logger class with an empty constructor
that inherits/implements the `MinimalLogger` abstract class and passing the fully qualified class
name into the `akka.stdout-logger-class` HOCON settings.

> [!WARNING]
> Be aware that `MinimalLogger` implementations are __NOT__ real actors and will __NOT__ have any
> access to the `ActorSystem` and all of its extensions. All logging done inside a `MinimalLogger`
> have to be done in as simple as possible manner since it is used to log how other loggers are
> behaving at the very start and very end of the `ActorSystem` life cycle.
>
> Note that `MinimalLogger` are __NOT__ interchangeable with other Akka.NET loggers and there can
> only be one `MinimalLogger` registered with the `ActorSystem` in the HOCON settings.
## Contrib Loggers
These loggers are also available as separate nuget packages

Expand Down Expand Up @@ -64,17 +86,18 @@ akka {
```
## Example configuration
```hocon
akka {
stdout-loglevel = DEBUG
loglevel = DEBUG
log-config-on-start = on
actor {
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
}
akka {
stdout-loglevel = DEBUG
loglevel = DEBUG
log-config-on-start = on
actor {
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
}
}
```
15 changes: 15 additions & 0 deletions src/Akka.sln
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerializationBenchmarks", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DDataStressTest", "examples\Cluster\DData\DDataStressTest\DDataStressTest.csproj", "{44B3DDD6-6103-4E8F-8AC2-0F4BA3CF6B50}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Cluster.Benchmarks", "benchmark\Akka.Cluster.Benchmarks\Akka.Cluster.Benchmarks.csproj", "{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1137,6 +1139,18 @@ Global
{44B3DDD6-6103-4E8F-8AC2-0F4BA3CF6B50}.Release|x64.Build.0 = Release|Any CPU
{44B3DDD6-6103-4E8F-8AC2-0F4BA3CF6B50}.Release|x86.ActiveCfg = Release|Any CPU
{44B3DDD6-6103-4E8F-8AC2-0F4BA3CF6B50}.Release|x86.Build.0 = Release|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Debug|x64.ActiveCfg = Debug|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Debug|x64.Build.0 = Debug|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Debug|x86.ActiveCfg = Debug|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Debug|x86.Build.0 = Debug|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Release|Any CPU.Build.0 = Release|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Release|x64.ActiveCfg = Release|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Release|x64.Build.0 = Release|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Release|x86.ActiveCfg = Release|Any CPU
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1245,6 +1259,7 @@ Global
{D62F4AD6-318F-4ECC-B875-83FA9933A81B} = {162F5991-EA57-4221-9B70-F9B6FEC18036}
{2E4B9584-42CC-4D17-B719-9F462B16C94D} = {73108242-625A-4D7B-AA09-63375DBAE464}
{44B3DDD6-6103-4E8F-8AC2-0F4BA3CF6B50} = {C50E1A9E-820C-4E75-AE39-6F96A99AC4A7}
{3CEBB0AE-6A88-4C32-A1D3-A8FB1E7E236B} = {73108242-625A-4D7B-AA09-63375DBAE464}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {03AD8E21-7507-4E68-A4E9-F4A7E7273164}
Expand Down
67 changes: 67 additions & 0 deletions src/benchmark/Akka.Benchmarks/Actor/ActorRefBenchmarks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// //-----------------------------------------------------------------------
// // <copyright file="ActorRefBenchmarks.cs" company="Akka.NET Project">
// // Copyright (C) 2009-2021 Lightbend Inc. <http://www.lightbend.com>
// // Copyright (C) 2013-2021 .NET Foundation <https://github.com/akkadotnet/akka.net>
// // </copyright>
// //-----------------------------------------------------------------------

using System;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Benchmarks.Configurations;
using BenchmarkDotNet.Attributes;

namespace Akka.Benchmarks.Actor
{
[Config(typeof(MicroBenchmarkConfig))] // need memory diagnosis
public class ActorRefBenchmarks
{
[Params(10000)]
public int Iterations { get; set; }
private TimeSpan _timeout;
private ActorSystem _system;
private IActorRef _echo;
private IActorRef _echo2;

[GlobalSetup]
public void Setup()
{
_timeout = TimeSpan.FromMinutes(1);
_system = ActorSystem.Create("system");
_echo = _system.ActorOf(Props.Create(() => new EchoActor()), "echo");
_echo2 = _system.ActorOf(Props.Create(() => new EchoActor()), "echo2");
}

[Benchmark]
public int ActorRefGetHashCode()
{
return _echo.GetHashCode();
}

[Benchmark]
public bool ActorRefEqualsSelf()
{
return _echo.Equals(_echo);
}

[Benchmark]
public bool ActorRefEqualsSomeoneElse()
{
return _echo.Equals(_echo2);
}

[GlobalCleanup]
public void Cleanup()
{
_system.Terminate().Wait();
}

public class EchoActor : UntypedActor
{
protected override void OnReceive(object message)
{
Sender.Tell(message);
}
}
}
}
Loading

0 comments on commit 42061a3

Please sign in to comment.