Yes now I am shifted to use kryo but its not working. below is my 
applicatin .conf
kindly help because m struck on kryo :(

akka {
extensions = ["com.romix.akka.serialization.kryo.KryoSerializationExtension$"]
event-handlers = 
["akka.event.slf4j.Slf4jEventHandler","com.typesafe.atmos.trace.Slf4jTraceContextEventHandler"]
 
      loggers = ["akka.event.slf4j.Slf4jLogger"]
      loglevel = "ERROR"

  actor {
    provider = "akka.cluster.ClusterActorRefProvider"
serializers {
                            # Define kryo serializer   
                            kryo = 
"com.romix.akka.serialization.kryo.KryoSerializer"
                    }
                    
                     serialization-bindings {
                    "java.util.List" = kryo
                    "java.io.Serializable" = kryo
                    "java.util.Map" = kryo
                    "akka.remote.message.Message" = kryo        
                    } 
    
        kryo  {  
    # Possibles values for type are: graph or nograph  
    # graph supports serialization of object graphs with shared nodes  
    # and cyclic references, but this comes at the expense of a small overhead  
    # nograph does not support object grpahs with shared nodes, but is usually 
faster   
    type = "graph"  


    # Possible values for idstrategy are:  
    # default, explicit, incremental  
    #  
    # default - slowest and produces bigger serialized representation. Contains 
fully-  
    # qualified class names (FQCNs) for each class. Note that selecting this 
strategy 
    # does not work in version 0.3.2, but is available on master and from 0.3.3 
onward.
    #  
    # explicit - fast and produces compact serialized representation. Requires 
that all  
    # classes that will be serialized are pre-registered using the "mappings" 
and "classes"
    # sections. To guarantee that both sender and receiver use the same numeric 
ids for the same  
    # classes it is advised to provide exactly the same entries in the 
"mappings" section   
    #  
    # incremental - fast and produces compact serialized representation. 
Support optional  
    # pre-registering of classes using the "mappings" and "classes" sections. 
If class is  
    # not pre-registered, it will be registered dynamically by picking a next 
available id  
    # To guarantee that both sender and receiver use the same numeric ids for 
the same   
    # classes it is advised to pre-register them using at least the "classes" 
section   

    idstrategy = "incremental"  

    # Define a default size for serializer pool
    # Try to define the size to be at least as big as the max possible number
    # of threads that may be used for serialization, i.e. max number
    # of threads allowed for the scheduler
    serializer-pool-size = 16

    # Define a default size for byte buffers used during serialization   
    buffer-size = 4096  

    # The serialization byte buffers are doubled as needed until they exceed 
max-buffer-size and an exception is thrown. Can be -1 for no maximum.
    max-buffer-size = -1

    # If set, akka uses manifests to put a class name
    # of the top-level object into each message
    use-manifests = false

    # Enable transparent compression of serialized messages
    # accepted values are: off | lz4 | deflate
    compression = off

    # Log implicitly registered classes. Useful, if you want to know all classes
    # which are serialized. You can then use this information in the mappings 
and/or 
    # classes sections
    implicit-registration-logging = false 

    # If enabled, Kryo logs a lot of information about serialization process.
    # Useful for debugging and lowl-level tweaking
    kryo-trace = false 

    # If proviced, Kryo uses the class specified by a fully qualified class name
    # to perform a custom initialization of Kryo instances in addition to what
    # is done automatically based on the config file.
    #kryo-custom-serializer-init = "CustomKryoSerializerInitFQCN"

    # Define mappings from a fully qualified class name to a numeric id.  
    # Smaller ids lead to smaller sizes of serialized representations.  
    #  
    # This section is mandatory for idstartegy=explciit  
    # This section is optional  for idstartegy=incremental  
    # This section is ignored   for idstartegy=default  
    #   
    # The smallest possible id should start at 20 (or even higher), because
    # ids below it are used by Kryo internally e.g. for built-in Java and 
    # Scala types   
    mappings {  
       # "akka.remote.message.Message" = 20
    }  
    
    
    # If enabled, Kryo uses internally a map detecting shared nodes.
                        # This is a preferred mode for big object graphs with a 
lot of nodes.
                        # For small object graphs (e.g. below 10 nodes) set it 
to false for 
                        # better performance. 
                        kryo-reference-map = true 
                        
  
                        # Define a set of fully qualified class names for   
                        # classes to be used for serialization.  
                        # The ids for those classes will be assigned 
automatically,
                        # but respecting the order of declaration in this 
section  
                        #  
                        # This section is optional  for idstartegy=incremental  
                        # This section is ignored   for idstartegy=default  
                        # This section is optional  for idstartegy=explicit  
                        classes = [  
                                # fully.qualified.classname1
                                # fully.qualified.classname2                    
                        ]  
  
}

  }
  remote {
    log-remote-lifecycle-events = off
    netty.tcp {
      hostname = "127.0.0.1"
      port = 0
      maximum-frame-size = 52428800
          send-buffer-size = 52428800
      receive-buffer-size = 52428800 
    }
  }

cluster {
    seed-nodes = [
      "akka.tcp://ClusterSystem@127.0.0.1:2551",
      "akka.tcp://ClusterSystem@127.0.0.1:2552"]

    auto-down-unreachable-after = 10s
  }






On Saturday, November 22, 2014 3:20:54 PM UTC+5:30, Akka Team wrote:
>
> Hi there,
> firstly - remoting does not "like" such large messages, it's effectively 
> "cloging the pipe".
> You should rather try to send more smaller messages to keep the system 
> responsive - sending a large message will take more time to serially 
> serialize it etc.
>
> Concerning the speed... You're using the default java serialization - it's 
> slow.
> If you care about performance - as it looks you do - you should serialize 
> the messages using Kryo, ProtoBuf or CapNproto etc.
> See here http://doc.akka.io/docs/akka/snapshot/scala/serialization.html
>
> On Thu, Nov 20, 2014 at 8:39 AM, neeraj negi <negi.ne...@gmail.com 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I have two node system one running on 2551 port and other running on 2552 
>> port on single machine right now.
>>
>> I am sending object containing 10000 records from 2551 to 2552 and the 
>> payload size is less then 1 Mb and it's taking around 60 to 70 millisecond 
>> for transfer from one node to another
>>
>> and if I increase the records i.e. 70000 and payload becomes around 6 Mb 
>> then it start taking 300 to 400 ms for transfer from one node to another
>>
>>
>> my application conf is:-
>>
>> akka {
>>
>> event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] 
>>       loggers = ["akka.event.slf4j.Slf4jLogger"]
>>       loglevel = "debug"
>>
>>   actor {
>>     provider = "akka.cluster.ClusterActorRefProvider"
>>   }
>>   remote {
>>     log-remote-lifecycle-events = off
>>     netty.tcp {
>>       hostname = "127.0.0.1"
>>       port = 0
>>       maximum-frame-size = 52428800
>>    send-buffer-size = 52428800
>>       receive-buffer-size = 52428800 
>>     }
>>   }
>>
>> cluster {
>>     seed-nodes = [
>>       "akka.tcp://ClusterSystem@127.0.0.1:2551",
>>       "akka.tcp://ClusterSystem@127.0.0.1:2552"]
>>
>>     auto-down-unreachable-after = 300s
>>   }
>>   
>> }
>>
>> How can i increase my transfer speed? 
>> am i missing something in Application.conf?
>>
>>
>>
>>
>>  -- 
>> >>>>>>>>>> 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 <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Akka Team
> Typesafe - The software stack for applications that scale
> Blog: letitcrash.com
> Twitter: @akkateam
>  

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to