From: jinglei@ren.systems (Jinglei Ren)
Subject: Latency of sequential vs. random small writes
Date: Sat, 18 Apr 2015 18:39:37 +0000 [thread overview]
Message-ID: <1429382376563.7463@ren.systems> (raw)
Hi guys,
I am trying NVMe user utilities (http://git.infradead.org/users/kbusch/nvme-user.git) on Intel SSD DC P3600, but find some counterintuitive results.
?
Why individual latency of sequential 512-bytes writes is much larger than that of random ones?
In my program, I issue 100 writes via ioctl(), whose "nblocks" is set to 0, i.e., 512 bytes. "Sequential" writes mean their "slba" (starting logical block address) is from 0 to 100 in order, while "random" writes mean their "slba" is a random number (below 1000 in my case). I calculate the average time to complete each ioctl() call. As a result, sequential writes each see whopping 1500+ usec latency, while random ones see only around 80 usec each.
This phenomenon is also confirmed by running FIO (http://freecode.com/projects/fio). For direct-device 1 KB writes with a single queue depth, sequential ones show 884 usec latency on average, while random ones show 10 usec.
I also tried options like NVME_RW_DSM_LATENCY_LOW and NVME_RW_DSM_SEQ_REQ, but none seems to help. By the way, any suggestion on these settings if I want low latency small writes that have to be sequentially appended?
Many thanks in advance for your help!
Best,
Jinglei
next reply other threads:[~2015-04-18 18:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-18 18:39 Jinglei Ren [this message]
2015-04-19 16:01 ` Latency of sequential vs. random small writes Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429382376563.7463@ren.systems \
--to=jinglei@ren.systems \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.