Link Details

Link 887881 thumbnail
User 1089863 avatar

By soliveirajr
via mentablog.soliveirajr.com
Published: Dec 07 2012 / 11:16

Asynchronous logging versus Memory Mapped Files 12-01-2012 by saoj | 0 comments One of the challenges of HFT systems is to minimize I/O latency. Whenever you want to write something to the disk or send something to the network you risk introducing latency in your critical thread. One solution for this problem is NIO (non-blocking I/O). For disk I/O you can use a memory-mapped file and for network I/O you can use a non-blocking channel. NIO is supposed to provide asynchronous output (i.e writes), meaning you pass the bytes to the OS (i.e. copy them to a direct byte buffer) and hope that the OS will make the best effort to do its job. In this article I will investigate how really asynchronous a write to a memory-mapped file is and then I will show you how you can use a lock-free queue to make a writing operation as asynchronous as possible.
  • 6
  • 0
  • 1369
  • 913

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (0)



    Java Performance Optimization
    Written by: Pierre-Hugues Charbonneau
    Featured Refcardz: Top Refcardz:
    1. Design Patterns
    2. OO JS
    3. Cont. Delivery
    4. Java EE7
    5. HTML5 Mobile
    1. Node.js
    2. Debugging JavaScript
    3. OO JS
    4. JSON
    5. Ajax