Is it possible to increase the number of serialization threads?

115 views
Skip to first unread message

Eduardo Fernandes

unread,
Jul 1, 2016, 7:14:24 PM7/1/16
to Akka User List
Hi.

I'm using Akka 2.3.13, Java edition.

I'm making some performance tests and in the same machine with 8 cores I see that the serialization process is my bottleneck.  I know that because after an increment of actor cpu usage the throughput is exactly the same. 

My actor system talks to 2 other nodes so I see 2 cores dedicated to serialization. Is is possible to increase the number of threads for serialization?

I'm using standard Java serialization but I have my own serialization implementation in my write/readObject methods so I think that switching to kryo or similar will not enhance too much the throughput. 

Many thanks for your help.

/Eduardo

Guido Medina

unread,
Jul 2, 2016, 7:27:28 AM7/2/16
to Akka User List
Try the following, these values work great,
you can try higher but I don't think it is going to help because the most of the bottleneck is because of design,
a problem related with how akka-remote is designed around Netty, but that will change soon: https://github.com/akka/akka-meta/issues/22

akka.remote.default-remote-dispatcher {
  type = Dispatcher
  executor = "fork-join-executor"

  fork-join-executor {
    parallelism-min = 4
    parallelism-factor = 1
    parallelism-max = 8
  }
}

Also, what serialization are you using? Hopefully is the not default Java serialization, most people use Kryo serialization.

Non-related but could help:
  • Set Akka version to "2.3.15" (next week 2.3.16 is probably going to be released)
  • Set Netty version to "3.10.6.Final" which will be part of next release.

HTH,

Guido.

Guido Medina

unread,
Jul 2, 2016, 7:31:12 AM7/2/16
to Akka User List
Didn't read the serialization part, must be that I need my coffee, Kryo is very well optimized, you don't know if is going to help until you test it.
Kryo also also has a pool of serializers that are ready to be used and can be improved if you declared the classes you are serializing.

Guido Medina

unread,
Jul 2, 2016, 7:35:01 AM7/2/16
to Akka User List
The following might also be helpful:


akka.remote {

  #log-remote-lifecycle-events = off

  netty.tcp {

    #port = 0

    server-socket-worker-pool {
      pool-size-min = 4
      pool-size-factor = 1
      pool-size-max = 8
    }

    client-socket-worker-pool {
      pool-size-min = 4
      pool-size-factor = 1
      pool-size-max = 8
    }
  }
}

Eduardo Fernandes

unread,
Jul 2, 2016, 1:35:13 PM7/2/16
to akka...@googlegroups.com
Hi. 

Many thanks for your suggestions. 

I will try and let you know. 

Thanks again for your time. 
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/EVsIxMEDKeI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Viktor Klang

unread,
Jul 2, 2016, 3:27:29 PM7/2/16
to Akka User List
I'm not sure I understand why write/readObject special methods would necessarily be faster? Most of the waste of Java Serialization is its envelopes and using class names etc.

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.

To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Cheers,

Eduardo Fernandes

unread,
Jul 2, 2016, 4:02:52 PM7/2/16
to akka...@googlegroups.com
Hi.

If you have writeObject/readObject defined in your class the Java plain serialization will invoke those methods. In my case all my internal members and class references are also serialized using the very same technique. So this is equivalent to technologies like kryo and similars since there is no overhead if you serialize basic members. In other words the pre-compiles classes you get from kryo are already made so there is no performance enhancement in this case. The big advantage of kryo is that you don't have to create the writeObject/readObject by yourself. In my particular case I've already done that job and my serialization is optimized in particular cases where I don't have to serialize all members depending of my semantic. I've made some tests and doing this way is faster than kryo but you have to burn some calories implementing a optimized serialization code. 

Bests regards and thanks for your comment.


You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/EVsIxMEDKeI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.

Viktor Klang

unread,
Jul 2, 2016, 4:05:49 PM7/2/16
to Akka User List
Hi Eduardo,

Perhaps I misunderstood, what serialization format are you emitting in your readObject/writeObject?
What overhead are you observing compared to using a custom Serializer?

Eduardo Fernandes

unread,
Jul 2, 2016, 4:13:01 PM7/2/16
to akka...@googlegroups.com
Hi Viktor.

I'm using basic (binary) serialization of basic Java types (int, String (UTF), long, arrays of basic types, etc...). 

The overhead is that depending of internal values there is no send to serialize some members and other not. If you merge your functional logic with the serialization you can make optimizations that a generic serializar can't do. Example. Suppose that if a member A has a null value you don't have to serialize other member B. Maybe the member B you don't have to serialize could have a null value which is fast to serialize but it is even faster you don't have even to serialize the null. This type of overhead is only possible if the serializer knows about your functional logic. 

Regards 

Eduardo Fernandes

unread,
Jul 2, 2016, 5:23:28 PM7/2/16
to akka...@googlegroups.com
Hi Guido.

After implementing your suggestions I'm realizing that maybe my particular case is a bit peculiar, I'm interested in a benchmark involving 2 hosts. I'm getting around 500.000 transactions per second (echo of array of 48 bytes), which is not a so bad number. Increasing the number of worker threads is not improving my numbers. I have two actors in a shard region talking to other two actors in other shard region (in other physical node). It looks like Akka/netty, when talking to the second shard region, never asks for more than one thread when connecting to the second shard region. I think that Akka could use as many threads as actors in the first shard region, below a max number. In my case, with a 8 cores machine, we could expect that, for example, two threads could be used to serialize from host1 to host2 but I'm afraid that is not the case. 

Thanks again for your time on this.

Regards.
    

Viktor Klang

unread,
Jul 3, 2016, 5:56:22 AM7/3/16
to Akka User List
Hi Eduardo,

I meant the overhead of the Java Serialization envelope.

Eduardo Fernandes

unread,
Jul 3, 2016, 6:28:55 AM7/3/16
to akka...@googlegroups.com
Ups... sorry for misunderstanding your question. 

My principal problem is not the overhead itself. My problem is that I can't get more threads serializing objects to a node. Example: one client I have 30%, lets say. If I add other client talking to other actor instance in parallel I would expect around 60% cpu usage in my server (I have 6 threads minimum and I'm pretty sure that the configuration would enable that from workers and netty perspective).  Nevertheless I get around 40% of my 8 cores machine working. If I put the actors in different processes I get the 60% I was expecting. When I say server I mean an actorsystem process (a single java process). 

Thanks again for your help.

Viktor Klang

unread,
Jul 3, 2016, 6:57:40 AM7/3/16
to Akka User List
Eduardo, are you sure that there aren't any synchronized-blocks or locks used? (i.e. is this a contention problem rather than a paralellization problem?)

Patrik Nordwall

unread,
Jul 3, 2016, 7:04:32 AM7/3/16
to Akka User List
The default remote dispatcher is configured with max 2 threads. Try Guido's advice and report back, thanks.
/Patrik

Roland Kuhn

unread,
Jul 3, 2016, 7:05:11 AM7/3/16
to akka...@googlegroups.com
Doesn't the classical remoting perform serialization within the single actor responsible for each connection?

Sent from my iPhone

Eduardo Fernandes

unread,
Jul 3, 2016, 7:45:57 AM7/3/16
to akka...@googlegroups.com
I'm using the configuration below, following Guido suggestions. 

Anyway, everything behaves like Akka/netty add more communication threads only if a add more endpoints. Adding more actores talking from host 1 to host 2 is not improving throughput, despite of the available idle cpu's.  Does this make sense?

Of course if my processing were not only dedicated to echo back some characters the processing cpu would hide the serialization performance. It just for find the maximum throughput (net performance) of a couple of actorsystem's. 

My topology is (attached file). Each client process has 10.000 internal sync clients and uses a single thread to dispatch messages. A single client reaches around 450.000/s and two reaches around 525.000/s. Each client talks to a particular actor in host 2 which talks to a particular actor in host 3.

Again, many thanks for your help.

Best regards.


Inline image 1


Again, many thanks for your help. 

  actor {
    provider = "akka.cluster.ClusterActorRefProvider"
    default-dispatcher {
      throughput = 1024
 fork-join-executor {
parallelism-min = 6
parallelism-factor = 1
parallelism-max = 8
      }
    }

# default-mailbox {
#      mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
#    }

  }
  remote {
    log-remote-lifecycle-events = off
    netty.tcp {
      tcp-nodelay = on
      write-buffer-high-water-mark = 40000000b
      write-buffer-low-water-mark = 0b
      send-buffer-size = 40000000b
      receive-buffer-size = 40000000b

 server-socket-worker-pool {
        pool-size-min = 4
pool-size-factor = 1
pool-size-max = 8
 }

 client-socket-worker-pool {
pool-size-min = 4
pool-size-factor = 1
pool-size-max = 8
 }
    }
  }

Guido Medina

unread,
Jul 3, 2016, 7:57:21 AM7/3/16
to Akka User List
I have mimic-ed your configuration and corrected some errors, also added Kryo if you want to give it a chance with the configuration I believe will do best.
I default the "java" serializer to Kryo, that way, everything that inherits "Serializable" will use Kryo, also, I list every class that I care (performance wise) under Kryo list.

Hope this give you better result, also, don't underestimate the the default mailbox you have commented out:

akka {
  extensions = ["com.romix.akka.serialization.kryo.KryoSerializationExtension$"]

  actor {
    provider = "akka.cluster.ClusterActorRefProvider"
    serializers.java = "com.romix.akka.serialization.kryo.KryoSerializer"
    default-mailbox.mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"

    default-dispatcher {
      type = Dispatcher
      executor = "fork-join-executor"

      fork-join-executor {
        parallelism-min = 4
        parallelism-factor = 1
        parallelism-max = 8
      }
    }

    kryo {
      kryo-reference-map = false
      idstrategy = "automatic"
      use-manifests = true
      buffer-size = 1024
      type = "nograph"

      classes = [
        "com.mypackage.Class1",
        "com.mypackage.Class2"
      ]
    }
  }

  remote {
    log-remote-lifecycle-events = off

    netty.tcp {

      server-socket-worker-pool {
        pool-size-min = 4
        pool-size-factor = 1
        pool-size-max = 8
      }

      client-socket-worker-pool {
        pool-size-min = 4
        pool-size-factor = 1
        pool-size-max = 8
      }
    }

    default-remote-dispatcher {
      type = Dispatcher
      executor = "fork-join-executor"

      fork-join-executor {
        parallelism-min = 4
        parallelism-factor = 1
        parallelism-max = 8
      }
    }
  }

  cluster {
    metrics.enabled = off
    jmx.enabled = off
  }
}

Guido Medina

unread,
Jul 3, 2016, 8:13:29 AM7/3/16
to Akka User List
I meant to say "anything that implements Serializable"
The classes list is important as Kryo won't write class names on the messages but IDs of the classes:

classes = [
  "com.mypackage.Class1",
  "com.mypackage.Class2"
]

Suffice to say every node of the cluster must have the same IDs so that's some sort of configuration you agree upon.
I find convenient to have a package in a "common" jar project with all the classes that I'm going to share (Serialize-ables)
and a "common.conf" with Akka configuration, as I can build my final configuration by putting together Akka configurations,
even using place holders, like this:

config = parseFile(new File(configPath)).withFallback(parseResources("common.conf"))...resolve();

You can use that fallback call as many times as you wish and it won't to resolve place holders until you don't call resolve()

HTH,

Guido.

Eduardo Fernandes

unread,
Jul 3, 2016, 8:28:46 AM7/3/16
to akka...@googlegroups.com
Quite clean. Many thanks Guido! I'll try it out. I have to inventory my classes so it will take a while. I hope I'll have some numbers this night. 

Anyway, kryo will scale vertically, I suppose. Will kryo use more threads than I'm using right now?

Thanks again for your help and knowledge. 

Guido Medina

unread,
Jul 3, 2016, 8:47:45 AM7/3/16
to Akka User List
Kryo and Akka Kryo don't use any threads, the remote-dispatcher is the one doing the work,
and Netty threads sending/receiving the bytes from/to Akka remote dispatcher as far as I can tell.

Both Kryo and Akka Kryo have a pool with Kryo instances which also happens to re-use the byte buffer making it very efficient in regards of GC.

Kryo pool by default uses a Java ConcurrentQueue (I contributed some of it to Akka Kryo extension) which you can change.
Read the section, KryoQueueBuilder:


which will also improve even further the GC collection.

HTH,

Guido.

Guido Medina

unread,
Jul 3, 2016, 9:14:45 AM7/3/16
to Akka User List
Correction:
  • Kryo offers a pool that you can use if you use Kryo directly, kind of the recommended way of using it.
  • Akka Kryo uses a similar model giving you the choice of using your own queue implementation for its internal pool of instances, each instance is an Akka serializer with its Kryo plus other things.
You can see the relevant Akka Kryo code for the pool in this commit/diff: https://github.com/romix/akka-kryo-serialization/commit/045cd27dfd01c2c41ab7c64bf6e25a63b3fd8e42

Guido.
Guido.
>>>>>>>>>> Search the archives: <a href="https://groups.google.com/group/akka-user" rel="nofollow" target="_blank" onmousedown="this.href='https://

Eduardo Fernandes

unread,
Jul 3, 2016, 9:43:56 AM7/3/16
to akka...@googlegroups.com
Ok. Thanks again. 

I'll give it a try. I have to adapt our code a bit. 

Thanks for your time on this. 

Eduardo Fernandes

unread,
Jul 3, 2016, 5:39:50 PM7/3/16
to akka...@googlegroups.com
Hi All.

I'm using akka-kryo-serialization_2.10 with incremental strategy. I'm using 2.10 for everything so maybe I should update in a near future. 

I'm getting the error below.

Anyway, after tunning kryo to work with my project, I never will get more cpu's working in my bench so I'm afraid that I'll reach kryo limits quite soon. 

To fully adapt kryo to our project maybe I need to include it in a sprint. I have a considerable number of serializable classes.

Thanks again for your time.

---------------------

Serialization trace:
callbacks (com.appgree.core.objectserver.providers.akka.client.ResponseImpl)
response (com.appgree.core.objectserver.providers.akka.commands.CommandRequest)
commands (com.appgree.core.objectserver.providers.akka.commands.CommandBulkRequest)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125)
at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:682)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
at com.esotericsoftware.kryo.Kryo.readObjectOrNull(Kryo.java:737)
at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.read(DefaultArraySerializers.java:368)
at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.read(DefaultArraySerializers.java:289)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:682)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:660)
at com.romix.akka.serialization.kryo.KryoBasedSerializer.fromBinary(KryoSerializer.scala:397)
at com.romix.akka.serialization.kryo.KryoSerializer.fromBinary(KryoSerializer.scala:239)
at akka.serialization.Serialization$$anonfun$deserialize$1.apply(Serialization.scala:104)
at scala.util.Try$.apply(Try.scala:161)
at akka.serialization.Serialization.deserialize(Serialization.scala:98)
at akka.remote.MessageSerializer$.deserialize(MessageSerializer.scala:23)
at akka.remote.DefaultMessageDispatcher.payload$lzycompute$1(Endpoint.scala:58)
at akka.remote.DefaultMessageDispatcher.payload$1(Endpoint.scala:58)
at akka.remote.DefaultMessageDispatcher.dispatch(Endpoint.scala:76)
at akka.remote.EndpointReader$$anonfun$receive$2.applyOrElse(Endpoint.scala:929)
at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
at akka.remote.EndpointActor.aroundReceive(Endpoint.scala:405)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.NullPointerException
at java.util.ArrayList.ensureExplicitCapacity(Unknown Source)
at java.util.ArrayList.ensureCapacity(Unknown Source)
at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:96)
at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:22)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:682)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
... 32 more

Guido Medina

unread,
Jul 3, 2016, 5:53:31 PM7/3/16
to Akka User List
Questions:
  • Why not just replace 2.10 with 2.11? From the Java perspective it should be transparent and irrelevant to your project -if I understood correctly, your project is in Java-
  • Are you using Java 8? If just why not just go Akka 2.4.x?
Next week Akka 2.4.8+ (if sprint goes well I think) will get a new juice, akka-artery which will replace the current Netty basically giving you a much faster remote component.
The automatic ID strategy is only available for akka-kryo 0.4.1+ which uses 2.11, automatic was the name we came up for default + incremental, basically to allow the developer to:
  • Register classes explicitly, for the ones registered manual performance will be better.
  • Register classes automatically not listed.
HTH,

Guido.

Eduardo Fernandes

unread,
Jul 3, 2016, 6:10:21 PM7/3/16
to akka...@googlegroups.com
Ok. I'll manage to change from 2.10 to 2.11. Yes, my project is in Java. We're using Java 8 but the transition to 2.4 is not direct since we've overriden some behaviors in 2.3 which changed in 2.4 ( for ex. AllocationStrategy). I've tried to change to 2.4 and I got many errors. 

Registering classes implicitly is not possible since we have many serialization asymmetries so I have to list the classes explicitly in configuration, as you've said.  I enabled kryo traces to print out automatically registered classed, which is very helpful. 

I'm working on it.

Thanks again for you patience. 

/Eduardo

Patrik Nordwall

unread,
Jul 4, 2016, 1:56:25 AM7/4/16
to akka...@googlegroups.com
On Mon, Jul 4, 2016 at 12:09 AM, Eduardo Fernandes <edu...@gmail.com> wrote:
Ok. I'll manage to change from 2.10 to 2.11. Yes, my project is in Java. We're using Java 8 but the transition to 2.4 is not direct since we've overriden some behaviors in 2.3 which changed in 2.4 ( for ex. AllocationStrategy). I've tried to change to 2.4 and I got many errors. 

Updating to 2.4 is a good idea, since OSS version of 2.3 is end-of-life. You find the migration guide here: http://doc.akka.io/docs/akka/2.4.7/project/migration-guide-2.3.x-2.4.x.html

I would like to clarify one thing regarding the release of the new remoting (Artery). We are still developing it and we are releasing development milestones that you can try out. M3 to be released end of next week according to the plan. It will be merged back to 2.4 and released in a 2.4.x version, but that will not happen next week.

/Patrik



--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Eduardo Fernandes

unread,
Jul 4, 2016, 2:48:06 AM7/4/16
to akka...@googlegroups.com
Many thanks Patrik. I'll share it with our dev team. I've read it when we have indeed to change our code a bit. If we can distribute the serialization across the processors I'm pretty sure we could achieve around 1.000.000 transactions/s in an 8 cores machine with 4 or 5 actors on each node. Right now I have around 500.000 with 2 actors but increasing the number of actors is not increasing the numbers as we should expect. The network bandwidth is not the problem and I have around 48% of CPU in idle state.

Regards and thanks again for the info.

Patrik Nordwall

unread,
Jul 4, 2016, 2:52:04 AM7/4/16
to akka...@googlegroups.com
Are you talking about 1.000.000 (500.000) messages/s over the network or what is your definition of transaction?

Eduardo Fernandes

unread,
Jul 4, 2016, 2:55:07 AM7/4/16
to akka...@googlegroups.com
Yes... 1.000.000 messages over the network (1.000.000 sent and 1.000.000 of ack's with the operation state, in this case a single echo). Sorry, I was not precise on that. We call it transaction becase we make a kind of commit in ram but in this case it is not relevant. 

Patrik Nordwall

unread,
Jul 4, 2016, 3:03:43 AM7/4/16
to akka...@googlegroups.com
Then I question how you measure this in your benchmark. With old (current) remoting I have observed max throughput of 25.000 msg/s (one way) using this test: https://github.com/akka/akka/blob/artery-dev/akka-remote-tests/src/multi-jvm/scala/akka/remote/artery/MaxThroughputSpec.scala

With new remoting (Artery) that test performs around 700.000 msg/s on my local machine.

Eduardo Fernandes

unread,
Jul 4, 2016, 3:13:46 AM7/4/16
to akka...@googlegroups.com
Wow!!! I have to try the new remoting!

The measurement is quite basic: I have a pool of threads and I just call the sends() and wait for the response and execute a new send. Nothing particular. I made a simple test with the old remote and my numbers were also around 25.000 msg/s, so we agree on that. On top of the old remote, on my local machine (4 cores) I set the client and the server and I get around 300.000 msg/s (really are 600.000 because we have cli->server and other server->client response). So I could expect a very good enhancement if we move to Artery. 

The limitation in my machine is CPU, not network, of course, because all operations go through the loopback virtual card, which is a lot faster than the real card. The CPU is high because of serialization. 

In your test of 700.000 does this include a response from the server (or remote peer or whatever)?

Thanks.

Patrik Nordwall

unread,
Jul 4, 2016, 3:18:31 AM7/4/16
to akka...@googlegroups.com
On Mon, Jul 4, 2016 at 9:13 AM, Eduardo Fernandes <edu...@gmail.com> wrote:
Wow!!! I have to try the new remoting!

The measurement is quite basic: I have a pool of threads and I just call the sends() and wait for the response and execute a new send. Nothing particular. I made a simple test with the old remote and my numbers were also around 25.000 msg/s, so we agree on that. On top of the old remote, on my local machine (4 cores) I set the client and the server and I get around 300.000 msg/s (really are 600.000 because we have cli->server and other server->client response). So I could expect a very good enhancement if we move to Artery. 

The limitation in my machine is CPU, not network, of course, because all operations go through the loopback virtual card, which is a lot faster than the real card. The CPU is high because of serialization. 

In your test of 700.000 does this include a response from the server (or remote peer or whatever)?

No, that's one-way between two JVMs. Flow control is handled by one ack per batch of 1000 messages (several of these batches in flight).

Eduardo Fernandes

unread,
Jul 4, 2016, 3:25:54 AM7/4/16
to akka...@googlegroups.com
Ok. In our case the ack is per message... anyway I could expect a very good improvement in number of transactions upgrading to Artery. We don't need the factor 30x you have. If we have a factor 2 or 3 it would be very welcome. 

Thanks for the info. This numbers could help me to push it into a near sprint. 

Best regards Patrik.

Guido Medina

unread,
Jul 4, 2016, 5:15:40 AM7/4/16
to Akka User List
Thanks Patrik for clarifying the Artery part I had misunderstood, it is getting really close anyway which makes me -and sure others- happy.

@Eduardo, the Kryo part will still apply, specially listing the classes as I did in my config example,
I wouldn't worry much about the KryoQueueBuilder part, I would get it to work first and worry about that later.

Regards,

Guido.

Eduardo Fernandes

unread,
Jul 4, 2016, 5:23:50 AM7/4/16
to akka...@googlegroups.com
Yes, I definitely will give a try to Kryo serialization. Right know, despite of using standard Java serialization, we're not sending class id's over the wire since we have a morphological serialization on each class. Nevertheless the Akka itself is doing that so Kryo could provide a good enhancement on that. I'm pretty sure that we'll get a significant performance improvement. 

Regards.
Reply all
Reply to author
Forward
0 new messages