-
Notifications
You must be signed in to change notification settings - Fork 403
Closed
Labels
2.11Target is 2.11 and all newer release/master branchesTarget is 2.11 and all newer release/master branchesfeatureA new functionalityA new functionalityperformance
Description
xlog and snap files are compressed, xlog_cursor_next reads them from HDD by ~50 KB chunks:
Lines 1898 to 1902 in 182034d
| while ((to_load = xlog_tx_cursor_create(&i->tx_cursor, | |
| (const char **)&i->rbuf.rpos, | |
| i->rbuf.wpos, i->zdctx)) > 0) { | |
| /* not enough data in read buffer */ | |
| int rc = xlog_cursor_ensure(i, ibuf_used(&i->rbuf) + to_load); |
Line 1548 in 182034d
| to_load += XLOG_READ_AHEAD; |
However XLOG_READ_AHEAD is only 16 KB, which doesn't make any sense.
Lines 1557 to 1558 in 182034d
| readen = fio_pread(cursor->fd, dst, to_load, | |
| cursor->read_offset); |
Here are CPU usage graphs for Tarantool recovery from a 900 MB snapshot (see #5787 "trees with hints") from a HDD with 300 MB/sec read speed (buffered, uncached).
The first run (# sync; echo 1 > /proc/sys/vm/drop_caches) took 25 sec:
The second run (with hot page cache) took 12 sec:
The first run is obviously I/O bound, it should be up to 2x faster with a big enough XLOG_READ_AHEAD.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.11Target is 2.11 and all newer release/master branchesTarget is 2.11 and all newer release/master branchesfeatureA new functionalityA new functionalityperformance

