<p>Here are some measurements (on RPM5, but its essentially the same implementation).</p>
<p>The system is Fedora 25, the disk is 7200rpm rotating media, dual 4 core xeons, etc.</p>
<p>The System.map file in the current RawHide kernel-core file was used to measure the time taken by the various system calls involved which were summed using the ramie/rpmsw.c "stop watch" (which uses rdtsc and has nsec precision and at least usec accuracy).</p>
<p>BASE == RPM before enabling I/O tweaks<br>
O_SYNC == write files opened with O_SYNC<br>
O_DSYNC == write files opened with O_DSYNC</p>
<p>fallocate,fdatasync,fadvise,fsync were enabled as in the patch on this thread</p>
<p>The measurements should be taken nominally: no effort was made to reproduce, or control for other system load, etc, etc.</p>
<h1>`<br>
BASE</h1>
<p>FDIO: 30 writes, 3763601 total bytes in 0.004301 secs</p>
<h1>BASE+O_SYNC</h1>
<p>FDIO: 30 writes, 3763601 total bytes in 1.320981 secs</p>
<h1>BASE+O_DSYNC</h1>
<p>FDIO: 30 writes, 3763601 total bytes in 3.115997 secs</p>
<h1>BASE+fdatasync+fasdvise+fsync</h1>
<p>FDIO: 30 writes, 3763601 total bytes in 0.005069 secs<br>
FDIO: 15 dsyncs, 0 total bytes in 0.730461 secs<br>
FDIO: 1 syncs, 0 total bytes in 0.005501 secs</p>
<h1>BASE+fallocate+fdatasync+fadvise+fsync</h1>
<p>FDIO: 30 writes, 3763601 total bytes in 0.003941 secs<br>
FDIO: 1 allocs, 3763601 total bytes in 0.000026 secs<br>
FDIO: 15 dsyncs, 0 total bytes in 0.703922 secs<br>
FDIO: 1 syncs, 0 total bytes in 0.005535 secs</p>
<p>`</p>
<p>So the best case is ~170x slower, and the worst case is ~725x slower, than just using the kernel caches. Again, these numbers should be taken nominally etc etc etc</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/187#issuecomment-294211495">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ANb80-ArVxd_4MDDsv3YobGVPOf_Ensiks5rv736gaJpZM4MyLOi">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ANb8017soDTFybOvo6MJZ4qRXR2JHPmeks5rv736gaJpZM4MyLOi.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/rpm-software-management/rpm/pull/187#issuecomment-294211495"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/rpm-software-management/rpm","title":"rpm-software-management/rpm","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/rpm-software-management/rpm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@n3npq in #187: Here are some measurements (on RPM5, but its essentially the same implementation).\r\n\r\nThe system is Fedora 25, the disk is 7200rpm rotating media, dual 4 core xeons, etc.\r\n\r\nThe System.map file in the current RawHide kernel-core file was used to measure the time taken by the various system calls involved which were summed using the ramie/rpmsw.c \"stop watch\" (which uses rdtsc and has nsec precision and at least usec accuracy).\r\n\r\nBASE == RPM before enabling I/O tweaks\r\nO_SYNC == write files opened with O_SYNC\r\nO_DSYNC == write files opened with O_DSYNC\r\n\r\nfallocate,fdatasync,fadvise,fsync were enabled as in the patch on this thread\r\n\r\nThe measurements should be taken nominally: no effort was made to reproduce, or control for other system load, etc, etc.\r\n\r\n`\r\nBASE\r\n====================================\r\n FDIO: 30 writes, 3763601 total bytes in 0.004301 secs\r\n\r\nBASE+O_SYNC\r\n====================================\r\n FDIO: 30 writes, 3763601 total bytes in 1.320981 secs\r\n\r\nBASE+O_DSYNC\r\n====================================\r\n FDIO: 30 writes, 3763601 total bytes in 3.115997 secs\r\n\r\nBASE+fdatasync+fasdvise+fsync\r\n====================================\r\n FDIO: 30 writes, 3763601 total bytes in 0.005069 secs\r\n FDIO: 15 dsyncs, 0 total bytes in 0.730461 secs\r\n FDIO: 1 syncs, 0 total bytes in 0.005501 secs\r\n\r\n\r\nBASE+fallocate+fdatasync+fadvise+fsync\r\n====================================\r\n FDIO: 30 writes, 3763601 total bytes in 0.003941 secs\r\n FDIO: 1 allocs, 3763601 total bytes in 0.000026 secs\r\n FDIO: 15 dsyncs, 0 total bytes in 0.703922 secs\r\n FDIO: 1 syncs, 0 total bytes in 0.005535 secs\r\n\r\n`\r\n\r\nSo the best case is ~170x slower, and the worst case is ~725x slower, than just using the kernel caches. Again, these numbers should be taken nominally etc etc etc"}],"action":{"name":"View Pull Request","url":"https://github.com/rpm-software-management/rpm/pull/187#issuecomment-294211495"}}}</script>