I/O Prefetch Cache as QEMU Block Filter Driver - Linux Foundation ...
Recommend Documents
'drives': floppy (a), hard disk (c), CD-ROM (d), network (n). 'sp_name': the ... 'rb_timeout': the timeout before guest
'disk_image' is a raw hard disk image for IDE hard disk 0. Standard ...... Recovery may need to recognize exact error. P
Bharata B Rao, IBM India. ... Support for many architectures / targets. â Support f
OUT endpoints (host-> device, or initiator to responder). Types of endpoints. Control. Bulk (Storage data). Isochrono
Linux guest code for Hyper-V (everything under. CONFIG_HYPERV). 3. trial & ... Hyper-V preexisting enlightenments ..
nature of the cache and (2) the many-datum reference type central processor instructions. No matter how high the cache hit rate is, a cache miss may impose a ...
No matter how high the cache hit rate is, a cache miss may impose a penalty on subsequent cache references. This penalty is the necessny of waiting until the ...
May 10, 2013 - High Performance I/O with NUMA Servers. 2. FUSION-IO. FU. IO N- ... Database Servers. FUSION-IO. FU ....
A processor cycle of 36 FO4 at 32 nm technology would result in a clock frequency around 2.4 GHz, which is in line with the market trends [26]. LB instruction hit ...
Aug 22, 2014 - Open source. â Started as ... found. â Large attack surface ... No more risk analysis, judgment calls
Oct 24, 2013 ... The official CAN API of the Linux Kernel ... CAN access in Linux – before
SocketCAN. ... Put CAN frame into RX queue after transmission has.
API common API for configuration and monitoring management system transport and. RPC protocols ... automation frameworks
The Linux kernel is the lowest level of software running on a Linux system. ..... email addresses, (2) sponsorship infor
Feb 16, 2012 - developers, system administrators, and other open source professionals? ... Even as overall unemployment
Nov 15, 2007 - Desktop Linux is awesome, but it isn't compellingly better for most users than popular proprietary operat
Code posted on http://oss.oracle.com/git/ (dtrace-0.2 branches). ⢠linux-2.6-dtrace-modules-beta.git ... profile â T
Apr 4, 2016 - common question: does it work with PREEMPT_RT ? it's orthogonal to it .... middleware or runtime (e.g., An
Nov 15, 2007 - Also, mobile platforms: MeeGo, Android, OpenMoko. (Maemo, Moblin, ... Package Mgr: Apt / .deb. Current Vn
Dynamic kernel function tracing. â trace all functions within the kernel. â pick and choose what functions to trace.
The Linux kernel is the lowest level of software running on a Linux system. ..... companies never participate in the dev
layer: (i) software queues that manage the IOs sub- mitted from a given ..... which instead of using mutexes to update a variable used the compare-and-swap ...
64-bit server/desktop computing with large amounts of cheap system memory, the perfor- mance and structure of .... efficient as just traversing trough a dedicated.
I/O Prefetch Cache as QEMU Block Filter Driver - Linux Foundation ...
Idea â Fetch the data before it is needed. ⢠There are different types of prefetch cache that focus on different rea
I/O Prefetch Cache as QEMU Block Filter Driver Pavel Butsykin Virtuozzo, inc. KVM Forum 2016
Prefetch cache • Idea – Fetch the data before it is needed • There are different types of prefetch cache that focus on different read patterns • Prefetching sequential data read (read-ahead) is one of the types of such cache
2
Read-ahead read 4K
16K
• Random access • can displace a lot of cache • can lead to performance degradation
• Sequential read detection?
3
QEMU Block Filter Driver
Guest
virtio sata Ide …
qcow2 pcache
parallels
vmdk
raw
…
Host fs
4
Parallel and sequential read sequential stream 1 1
2
3
4
5
6
sequential stream 2 A
B
C
D
one of the possible sequences
E F
1
A
B
g
2
C
pcache
sequential stream 3 g
h
i
j
k
l
5
Sequential read detection 512K
630K
request response
Node 124K - 1M
pool requests
120K 4K
RBTree key offset
124K 1M
64K 10K
size 0 32K
FIFO
128K
112K 8K
4M 8K
6
PCache AIO read overview • Skip large requests (by default larger then 64Kb) • Update request statistics • Cache lookup • hit • partial hit • miss
• Read-ahead • check request sequence • read into cache a chunk of data form the end of the current request 7
Cache memory • The cache memory has limited size (4Mb by default)
RBTree key offset
• The cache is managed by LRU algorithm
size
728K-30K 606K-26K
558K-8K 0-412K
656K-17K 653K-3K
780K-26K 758K-22K
816K-2K
702K-26K
1021K-3K
1Mb 566K
0
412K
558K
632K 656K
702K
606K 653K 673K
728K
758K
780K
806K 818K
816K
1024K
1021K
8
Why you need LRU for the prefetch cache? If you have read one part of the node, then there is a high probability that you will soon read the remaining parts of the node. 9
node 211
8
sequential read 7 6
node 210
5
node 209
4
displacement
9
Partial cache hit read request 2
read request 1
offset: 600K; size: 130K
offset: 0; size: 420K
part of cache memory 566K
0
412K
offset: 412K; size: 8K
558K
632K 656K
702K
606K 653K 673K
offset: 600K; size: 6K
728K
758K
780K
806K 818K
816K
offset: 632K; size: 21K
1024K
1021K
offset: 673K; size: 29K
HDD 10
PCache AIO write overview • Drop all nodes intersecting with request • Write-through
How to complete an request which expects other requests ?
node
request complete refcount=0
complete!
refcount=0 1 node complete
death
1 request unreference
2 request unreference
2 node complete
N node complete
N request unreference
13
Read-ahead policy • Original requests are not written to the cache and only serve to update statistics • Filtering of large requests helps to detect sequential read • If part of the readahead is already in the cache then only the missing pieces will be fetched from disk current request check readahead_size
req N-5
req N-4
req N-3
req N-2
req N-1
req N
do readahead
14
SSDSC2BW120A4 EXT4
#↓ 1 2 3 4
I/O Test 2G-read-seq-4K(01) 2G-read-seq-4K(04) 2G-read-seq-4K(16) 2G-read-seq-4K-AIO4(01)
QEMU 2.6.50 VirtIO QEMU 2.6.50 VirtIO qcow2 Linux 4.4.0 qcow2 Linux 4.4.0 Fedora-22 2SMP Fedora-22 2SMP 2GB 2GB VM VM + dataplane #1 100% 100% 100%
vs #1
QEMU 2.6.50 VirtIO qcow2 Linux 4.4.0 Fedora-22 2SMP 2GB VM + pcache vs #1
vs #2
QEMU 2.6.50 VirtIO qcow2 Linux 4.4.0 Fedora-22 2SMP 2GB VM + dataplane + pcache vs #1
QEMU 2.6.50 VirtIO qcow2 Linux 4.4.0 Fedora-22 2SMP 2GB VM
Test
Scores
#↓ 1
QEMU 2.6.50 VirtIO qcow2 Linux 4.4.0 Fedora-22 2SMP 2GB VM + pcache
Scores
dir_readdir
vs #1 +1.9%
134
137
Testcase: create a directory and populate it with 10 subdirs and 10 files with max depth 3 once before test. Total: there are 10^3 dirs and 10^3 files.: All files are empty: (1) open() root dir, then readdir() recursively, close():
16
Qemu bench
17
I\O requests
4K AIO read requests (pcache)
For readahead_size = 64Kb, it was the expected result
chunk size 18
4K AIO read requests (pcache + iothread)
I\O requests
iothread helped to merge a lot of requests
chunk size
19
Conclusions • PCache can optimize certain I/O patterns without pessimizing others • PCache implementation in the form of the driver filter is unintrusive • PCache is not universally useful, benchmark your patterns before enabling