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

On Sat, Jul 2, 2016 at 10:05 PM, Viktor Klang <viktor.kl...@gmail.com>
wrote:

> 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?
>
> On Sat, Jul 2, 2016 at 10:02 PM, Eduardo Fernandes <edu...@gmail.com>
> wrote:
>
>> 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.
>>
>>
>> On Sat, Jul 2, 2016 at 9:27 PM, Viktor Klang <viktor.kl...@gmail.com>
>> wrote:
>>
>>> 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.
>>>
>>> On Sat, Jul 2, 2016 at 1:14 AM, Eduardo Fernandes <edu...@gmail.com>
>>> wrote:
>>>
>>>> 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
>>>>
>>>> --
>>>> >>>>>>>>>> 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+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to akka-user@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/akka-user.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> √
>>>
>>> --
>>> >>>>>>>>>> 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+unsubscr...@googlegroups.com.
>>> To post to this group, send email to akka-user@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> >>>>>>>>>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Cheers,
> √
>
> --
> >>>>>>>>>> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to