Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

$ make
$ dd if=/dev/zero of=X bs=256M count=1
$ ./write-bench <X >Y # Same as "cp X Y"

Notes

  • The benchmark sleeps 0.1 seconds between all three runs
  • Best run is displayed in the first column
  • The file is read sequentially once prior to the benchmark
  • Benchmark only measures the time to copy data to stdout
    • In particular, depending on filesystem, the next ftruncate(fd, 0) may take very long
    • No fsync() or fdatasync() is performed

Also see my blog post on the topic.

Some Results

Ext3+dmcrypt, SSD, filesize=256MB, kernel=3.13-1-amd64

pipe+splice + advices + trunc 371ms 385ms 2704ms
sendfile + advices + trunc 380ms 528ms 2910ms (+ 2.4%)
read+write 16bs + advices 384ms 414ms 425ms (+ 3.5%)
pipe+splice 389ms 403ms 1631ms (+ 4.9%)
sendfile 390ms 410ms 663ms (+ 5.1%)
read+write 256bs 393ms 634ms 806ms (+ 5.9%)
sendfile + advices 401ms 408ms 446ms (+ 8.1%)
pipe+splice + advices 403ms 416ms 417ms (+ 8.6%)
read+write 16bs 405ms 537ms 896ms (+ 9.2%)
read+write 4bs 413ms 427ms 638ms (+ 11.3%)
mmap+write + advices + trunc 414ms 449ms 755ms (+ 11.6%)
mmap+write + advices 432ms 458ms 740ms (+ 16.4%)
mmap+write 438ms 444ms 846ms (+ 18.1%)
read+write bs 469ms 538ms 901ms (+ 26.4%)
read+write 1k 639ms 672ms 866ms (+ 72.2%)
read+write 16bs + advices + trunc 1007ms 1500ms 4062ms (+ 171.4%)
sendfile + advices + falloc 1381ms 1486ms 1742ms (+ 272.2%)
mmap+write + advices + falloc 1405ms 1426ms 1576ms (+ 278.7%)
read+write 16bs + advices + falloc 1446ms 1524ms 1683ms (+ 289.8%)
pipe+splice + advices + falloc 1863ms 1909ms 1950ms (+ 402.2%)

XFS, SSD, filesize=1GB, kernel=2.6.32-5-amd64

sendfile + advices + falloc 398ms 405ms 406ms
pipe+splice + advices + falloc 407ms 409ms 409ms (+ 2.3%)
sendfile 445ms 448ms 459ms (+ 11.8%)
sendfile + advices 447ms 448ms 450ms (+ 12.3%)
pipe+splice 459ms 460ms 462ms (+ 15.3%)
pipe+splice + advices 460ms 460ms 467ms (+ 15.6%)
read+write 16bs + advices + falloc 464ms 465ms 466ms (+ 16.6%)
sendfile + advices + trunc 468ms 471ms 476ms (+ 17.6%)
pipe+splice + advices + trunc 471ms 472ms 476ms (+ 18.3%)
mmap+write + advices + falloc 482ms 483ms 485ms (+ 21.1%)
read+write 256bs 504ms 508ms 512ms (+ 26.6%)
read+write 16bs 505ms 506ms 507ms (+ 26.9%)
read+write 16bs + advices 511ms 515ms 528ms (+ 28.4%)
read+write 4bs 524ms 538ms 541ms (+ 31.7%)
mmap+write + advices 530ms 530ms 544ms (+ 33.2%)
mmap+write 530ms 533ms 533ms (+ 33.2%)
read+write 16bs + advices + trunc 537ms 540ms 543ms (+ 34.9%)
mmap+write + advices + trunc 557ms 563ms 564ms (+ 39.9%)
read+write bs 630ms 638ms 638ms (+ 58.3%)
read+write 1k 1138ms 1156ms 1168ms (+ 185.9%)

XFS, Hard Drive, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice + advices + falloc 580ms 597ms 706ms
sendfile + advices + falloc 591ms 600ms 710ms (+ 1.9%)
pipe+splice + advices 624ms 699ms 766ms (+ 7.6%)
sendfile + advices 627ms 658ms 676ms (+ 8.1%)
pipe+splice 650ms 748ms 887ms (+ 12.1%)
sendfile 653ms 658ms 693ms (+ 12.6%)
read+write 16bs + advices + falloc 683ms 688ms 689ms (+ 17.8%)
sendfile + advices + trunc 685ms 686ms 825ms (+ 18.1%)
pipe+splice + advices + trunc 691ms 720ms 723ms (+ 19.1%)
read+write 16bs 718ms 742ms 753ms (+ 23.8%)
mmap+write + advices + falloc 733ms 733ms 820ms (+ 26.4%)
read+write 256bs 737ms 741ms 746ms (+ 27.1%)
read+write 16bs + advices 746ms 754ms 758ms (+ 28.6%)
read+write 4bs 759ms 774ms 817ms (+ 30.9%)
read+write 16bs + advices + trunc 774ms 775ms 780ms (+ 33.4%)
mmap+write 786ms 798ms 799ms (+ 35.5%)
mmap+write + advices + trunc 814ms 831ms 948ms (+ 40.3%)
mmap+write + advices 815ms 845ms 927ms (+ 40.5%)
read+write bs 856ms 889ms 905ms (+ 47.6%)
read+write 1k 1482ms 1497ms 1534ms (+ 155.5%)

tmpfs /dev/shm, filesize=256MB, kernel=3.13-1-amd64

sendfile + advices + trunc 132ms 133ms 133ms
sendfile 132ms 132ms 133ms (+ 0.0%)
sendfile + advices 133ms 134ms 134ms (+ 0.8%)
pipe+splice 133ms 134ms 134ms (+ 0.8%)
pipe+splice + advices + trunc 134ms 134ms 134ms (+ 1.5%)
pipe+splice + advices 134ms 134ms 135ms (+ 1.5%)
read+write 16bs + advices + trunc 135ms 136ms 137ms (+ 2.3%)
read+write 16bs + advices 135ms 136ms 136ms (+ 2.3%)
read+write 16bs 135ms 135ms 135ms (+ 2.3%)
read+write 256bs 137ms 137ms 138ms (+ 3.8%)
read+write 4bs 139ms 139ms 140ms (+ 5.3%)
sendfile + advices + falloc 140ms 140ms 141ms (+ 6.1%)
pipe+splice + advices + falloc 142ms 142ms 143ms (+ 7.6%)
read+write 16bs + advices + falloc 145ms 145ms 145ms (+ 9.8%)
read+write bs 154ms 155ms 155ms (+ 16.7%)
mmap+write + advices 169ms 170ms 170ms (+ 28.0%)
mmap+write 169ms 170ms 170ms (+ 28.0%)
mmap+write + advices + trunc 170ms 170ms 174ms (+ 28.8%)
mmap+write + advices + falloc 175ms 176ms 178ms (+ 32.6%)
read+write 1k 244ms 245ms 258ms (+ 84.8%)

NFS, filesize=1G, kernel=2.6.32-5-amd64

pipe+splice 448ms 508ms 564ms
sendfile 485ms 496ms 501ms (+ 8.3%)
sendfile + advices 495ms 508ms 569ms (+ 10.5%)
sendfile + advices + trunc 497ms 524ms 526ms (+ 10.9%)
pipe+splice + advices 512ms 528ms 542ms (+ 14.3%)
pipe+splice + advices + trunc 515ms 563ms 734ms (+ 15.0%)
sendfile + advices + falloc 546ms 596ms 18629ms (+ 21.9%)
read+write 16bs + advices + trunc 548ms 578ms 626ms (+ 22.3%)
read+write 4bs 560ms 583ms 649ms (+ 25.0%)
read+write 16bs + advices 561ms 597ms 599ms (+ 25.2%)
pipe+splice + advices + falloc 580ms 589ms 590ms (+ 29.5%)
read+write 16bs 605ms 610ms 638ms (+ 35.0%)
mmap+write + advices 610ms 637ms 807ms (+ 36.2%)
read+write 16bs + advices + falloc 614ms 652ms 652ms (+ 37.1%)
read+write bs 621ms 624ms 643ms (+ 38.6%)
mmap+write 637ms 640ms 657ms (+ 42.2%)
mmap+write + advices + trunc 639ms 655ms 658ms (+ 42.6%)
mmap+write + advices + falloc 667ms 672ms 699ms (+ 48.9%)
read+write 256bs 686ms 688ms 713ms (+ 53.1%)
read+write 1k 1638ms 1717ms 19303ms (+ 265.6%)

(Whole benchmark very slow because of synces: 0.16s user 47.74s system 2% cpu 30:21.46 total.)

About

Benchmark for some write patterns

Resources

Stars

16 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages