Discussions

Performance and scalability: RMI Scalability

  1. RMI Scalability (3 messages)

    Hi.

    I'm about to start work on a project in which we're thinking of using RMI. It involves having several thousand clients connecting to the server at the same time.

    What are people's experiences with projects using RMI of this scale and larger? Any scalability issues? Anything I should keep in mind?

    Thanks in advance

    Threaded Messages (3)

  2. RMI Scalability[ Go to top ]

    As a starting point http://www.javaperformancetuning.com/tips/j2ee_rmi.shtml might help.
  3. RMI Scalability[ Go to top ]

    RMI uses a scoket pool underneath to route the call through the stub. The sockets are returned to the pool only after the completion of the remote method call. So any concurrent method call would require a new socket connection to be made. This means that if there are too many calls trying to be made on the same remote object at the same time, this would result in that many socket connection being seeked. This would result in a SocketException as the Accept queue of the server socket would become full.We experienced a similar problem when there were around 100 threads simultaneously making calls on a remote object.

    Thanks,
    Prasun
  4. RMI Scalability[ Go to top ]

    Hi.I'm about to start work on a project in which we're thinking of using RMI. It involves having several thousand clients connecting to the server at the same time.What are people's experiences with projects using RMI of this scale and larger? Any scalability issues? Anything I should keep in mind?Thanks in advance

    You must consider - at least - two things:

    1) The amount of information passed as an argument via RMI. This information must be serialized and deserialized, and this is expensive, specially for the garbage collector.

    2) The max amount of sockets in the machine. Also, you must check the parameter of the operating system that decides how long a closed socket remains in CLOSE_WAIT state. The sooner they get closer, the more RMI calls you can perform until you run out of sockets.


    Jose Ramon Huerga

    http://www.terra.es/personal/jrhuerga