Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6095889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:51:47+00:00 2026-05-23T12:51:47+00:00

When i do traceroute from one solaris m/c to another using 10 gig network

  • 0

When i do traceroute from one solaris m/c to another using 10 gig network interface it takes 0.073 ms for 40 bytes packets.

When i do the same thing in java, the time is way longer. It is longer even after 10K iteration. What could be the reason ?

Java: Sender (Snippet)

Socket sendingSocket = new Socket(address, RECEIVER_PORT);
 sendingSocket.setTcpNoDelay(true);
 OutputStream outputStream = sendingSocket.getOutputStream();
 byte[] msg = new byte[64]; // assume that it is populated. 
 for (int i = 0; i < 10000; i++) {
    long start = System.nanoTime();
    outputStream.write(msg,0,64);
    outputStream.flush();

    inputStream.read(msg,0,64);  // inputStream is initialized like outputstream 
    long end = System.nanoTime(); 
 }  

It takes way longer 69 millis and it does not even depends upon the byte size. Even if i reduce it to say 1 byte array, it still takes 69 millis. Any comment/Suggestion ?

Other Observation:
1. OutputStream.write and flush only takes 6 micros.
2. Similarly on the other end TCPReceiver side which receives and writes back, it only takes 6 micros.

Solution:
Thank you all you responded for this query.
I found that it was due to the socket buffer size:

Default buffer size set on solaris m/c.

Received Buffer Size 49152.

Sending Buffer Size 7552.

I increased the socket buffer size and the performance almost matches traceRoute.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:51:48+00:00Added an answer on May 23, 2026 at 12:51 pm

    You are not comparing like with like. ICMP and TCP are way different protocols.

    If you want to decide if the latency is in your code, the JVM, Solaris TCP stack or the network you’ll have to start with tcpdump / wireshark etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this one: traceroute <ip-address|dns-name> [ttl <ttl>] [wait <milli-seconds>] [no-dns]
I would like to be able to perform a ping and traceroute from within
Earlier, I asked this question: How can I perform a ping or traceroute using
I am trying to process IP addresses from traceroute ,which writes to a file
When I use traceroute, I often see abbreviations in the hostnames along the route,
Does anyone have C# code handy for doing a ping and traceroute to a
It seems almost magical. What is the traceroute command doing in order to map
This is a sub routine that I copied from CPAN. It works fine as
While trying to figure out the best method to ping (ICMP) something from python,
I wish to use traceroute command in my java application. Unfortunately in Windows It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.