How to measure network time taken in distributed system

Discussions

Performance and scalability: How to measure network time taken in distributed system

  1. Hi All,

    I need to do performance testing for a distributed system which includes 2 J2EE application tier running in 2 different Solaris boxes, Database (Oracle) running in 3rd Solaris machine and the client (Java Swing) running in another machine (PC Desktop).

    I'll have to measure the time taken by the network call from one tier to other. To exaplin it further - I need to measure the time difference between the control leaving a particular machine and it reaching the next machine in the execution path.

    In this context the problem I'm facing in deciding on how to synchronize the time across all these 4 different machines (apart from manually setting them to same time).

    Can anyone please suggest me of standard approach(es) followed for solving this type of issue in performance testing for such a distributed system ?

    Thanks in advance,

    Regards,
    Sourav
  2. Measure the total time per invocation from the POV of the calling machine and from (for example) the EJB on the callee. The difference is the overhead, and includes network and RMI argument deserialization time.

    Peace,

    Cameron Purdy
    Tangosol, Inc.
    Coherence: Clustered JCache for Grid Computing!
  3. Hi Peace,

    Could you please explain me what do you mean by POV ?

    Regards,
    Sourav
  4. POV = Point Of View

    In other words, if the call from the calling machine is:

    foo();

    Then measure:

    long ldtStart = System.currentTimeMillis();
    foo();
    long ldtFinish = System.currentTimeMillis();
    System.out.println("Time to call foo: " + (ldtFinish - ldtStart) + "ms");

    On the callee, foo looks like:

    foo() {
    // bla bla
    }

    Change it to:

    foo() {
    long ldtStart = System.currentTimeMillis();
    // bla bla
    long ldtFinish = System.currentTimeMillis();
    System.out.println("Time to process foo: " + (ldtFinish - ldtStart) + "ms");
    }

    Now compare the times.

    Peace,

    Cameron Purdy
    Tangosol, Inc.
    Coherence: Clustered JCache for Grid Computing!
  5. Hi Peace,

    Thanks for your explanation.

    However in my case the situation is bit complecated. My distributed computing environment there are 4 machines and execution of one single use case typically involves methods/procedured execution in all 4 machine. To explain it more -

    Let us assume there are 4 machines - A, B, C and D.

    The use case starts from A (that is the client code in Java Swing), then it hits B, C and D and then comes back to A in reverse order. In this situation following your strategy I'll be able to find out the summation of network time taken from A to B, B to C and C to D, but not the individual time taken by each of those connections. In that way I'll never able to find out which network path I need to fine tune.

    Regards,
    Sourav
  6. You're not particularly interested in any one invocation, but rather trends.

    Do a load test. Log all the stats that I mentioned. Then analyze them. You'll see a trend as to where the time is being taken. You don't need exact numbers to see this type of trend; a picture will take shape regardless.

    Peace,

    Cameron Purdy
    Tangosol, Inc.
    Coherence: Clustered JCache for Grid Computing!