Link Details

Link 887881 thumbnail
User 1089863 avatar

By soliveirajr
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
  • 1468
  • 914

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)

    Apache Hadoop
    Written by: Piotr Krewski
    Featured Refcardz: Top Refcardz:
    1. Play
    2. Akka
    3. Design Patterns
    4. OO JS
    5. Cont. Delivery
    1. Play
    2. Java Performance
    3. Akka
    4. REST
    5. Java