DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Low Latency Slides

Low Latency Slides

Peter Lawrey user avatar by
Peter Lawrey
·
Dec. 01, 11 · Java Zone · Interview
Like (0)
Save
Tweet
4.28K Views

Join the DZone community and get the full member experience.

Join For Free

Last weekend was LJC Open Conference #4, and like many people I got a lot out of it.

My talk was up first which meant I could relax for the rest of the day.

Here are the slides

Note: the message size was 16 longs or 128 bytes. This makes a difference at higher throughputs.

In answer to @aix's questions

On slide 12; what are we measuring here, elapsed time from the message hitting the buffer to the "echo" reply showing up on the client socket?
In each message I add a timestamp as it is written. When each message is read, I compare the timestamp with the current time. I sort the results and take the middle / 50%tile as typical timings and the worst 0.01% as the 99.99%tile.
What's causing the large difference between "nanoTime(), Normal" and "RDTSC, Normal" in the bottom half of the slide (2M/s)?
The reason for taking the RDTSC directly (9 ns) is that System.nanoTime() is quite slow on Centos 5.7 (180 ns) and the later is a system calls which may disturb the cache. At modest message rate 200K/s (one message every 5000 ns) the difference is minor however as the message rates increase 2M/s (one message every 500 ns) the addition to latency is significant. Its not possible to send messages over 5 M/s if I was using System.nanoTime() where as with RDTSC I got up to 12 M/s. Without timing each message, I got a throughput of 17 M/s.

From http://vanillajava.blogspot.com/2011/11/low-latency-slides.html

Throughput (business) Cache (computing) Buffer (application) Sort (Unix) Modest (email client)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Quantum Computers Explained
  • How to Get GDPR and Customer Communications Right
  • Version Number Anti-Patterns
  • Terraform Controller: Cloud Resource Self-Service

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo