148 lines
5.6 KiB
HTML
148 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en"><head>
|
|
<title>GoatPr0n.farm</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="format-detection" content="telephone=no" />
|
|
<meta name="theme-color" content="#000084" />
|
|
<link rel="icon" href="https://goatpr0n.farm//favicon.ico">
|
|
<link rel="canonical" href="https://goatpr0n.farm/">
|
|
|
|
<link rel="stylesheet" href="/css/bootstrap.css">
|
|
<link rel="stylesheet" href="/css/bootstrap-responsive.css">
|
|
<link rel="stylesheet" href="/css/style.css">
|
|
|
|
</head><body>
|
|
<nav class="navbar navbar-inverse navbar-fixed-top">
|
|
<div class="navbar-inner">
|
|
<div class="container">
|
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"></button>
|
|
<a class="brand" href="https://goatpr0n.farm/">GoatPr0n.farm</a>
|
|
<div class="nav-collapse collapse">
|
|
<ul class="nav">
|
|
|
|
|
|
|
|
<li>
|
|
<a href="/posts/">
|
|
|
|
<span>All posts</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav><div id="content" class="container">
|
|
|
|
<div class="row-fluid navmargin">
|
|
<div class="page-header">
|
|
<h1>What if the cult of dd is right? - Wed, Jan 23, 2019</h1>
|
|
</div>
|
|
<p class="lead"></p>
|
|
<h2 id="are-you-a-believer">Are you a believer?</h2>
|
|
<p>There are articles out there talking about the useless usage of <code>dd</code> and why <code>cat</code> is better. <code>Cat</code> is faster because it automatically adjusts the blocksize and <code>dd</code> is slow because it internally only works with 512 byte blocks. <a href="https://eklitzke.org/the-cult-of-dd">This</a> and <a href="https://www.vidarholen.net/contents/blog/?p=479">That</a>.</p>
|
|
<p>I did some simple tests with <code>time</code>, <code>dd</code> and <code>cat</code>, added some obscure parameters to <code>dd</code>, because <code>cat</code> is better.</p>
|
|
<h3 id="testing-dd-with-status-and-specific-blocksize">Testing <code>dd</code> with status and specific blocksize</h3>
|
|
<pre><code> $ time dd if=/dev/sdd of=test.dd status=progress bs=8M
|
|
15921577984 bytes (16 GB, 15 GiB) copied, 878 s, 18.1 MB/s
|
|
1899+1 records in
|
|
1899+1 records out
|
|
15931539456 bytes (16 GB, 15 GiB) copied, 879.018 s, 18.1 MB/s
|
|
|
|
0.04s user 23.33s system 2% cpu 14:39.03 total
|
|
</code></pre>
|
|
<h3 id="testing-dd">Testing <code>dd</code></h3>
|
|
<pre><code> $ dd if=/dev/sdd of=test.dd
|
|
31116288+0 records in
|
|
31116288+0 records out
|
|
15931539456 bytes (16 GB, 15 GiB) copied, 869.783 s, 18.3 MB/s
|
|
16.13s user 159.22s system 20% cpu 14:29.80 total
|
|
</code></pre>
|
|
<h3 id="testingcat-with-pv">Testing<code>cat</code> with <code>pv</code></h3>
|
|
<pre><code> $ time cat /dev/sdd | pv > test.raw
|
|
14.8GiB 0:14:43 [17.2MiB/s] [ <=> ]
|
|
0.28s user 25.84s system 2% cpu 14:43.18 total
|
|
</code></pre>
|
|
<h3 id="testing-cat">Testing <code>cat</code></h3>
|
|
<pre><code> $ time dd if=/dev/sdd of=test.dd status=progress bs=8M
|
|
15921577984 bytes (16 GB, 15 GiB) copied, 878 s, 18.1 MB/s
|
|
1899+1 records in
|
|
1899+1 records out
|
|
15931539456 bytes (16 GB, 15 GiB) copied, 879.018 s, 18.1 MB/s
|
|
|
|
0.04s user 23.33s system 2% cpu 14:39.03 total
|
|
</code></pre>
|
|
<h3 id="testing-dd-1">Testing <code>dd</code></h3>
|
|
<pre><code> $ dd if=/dev/sdd of=test.dd
|
|
31116288+0 records in
|
|
31116288+0 records out
|
|
15931539456 bytes (16 GB, 15 GiB) copied, 869.783 s, 18.3 MB/s
|
|
16.13s user 159.22s system 20% cpu 14:29.80 total
|
|
</code></pre>
|
|
<h3 id="testing-catwith-pv">Testing <code>cat</code>with <code>pv</code></h3>
|
|
<pre><code> $ time cat /dev/sdd | pv > test.raw
|
|
14.8GiB 0:14:43 [17.2MiB/s] [ <=> ]
|
|
0.28s user 25.84s system 2% cpu 14:43.18 total
|
|
</code></pre>
|
|
<h3 id="testing-cat-1">Testing <code>cat</code></h3>
|
|
<pre><code> $ time cat /dev/sdd > test.raw
|
|
0.18s user 21.21s system 2% cpu 14:42.25 total
|
|
</code></pre>
|
|
<h3 id="y-u-do-it-wrong">Y U DO IT WRONG</h3>
|
|
<p>Somehow my <code>cat</code> is not as fast as <code>dd</code>.</p>
|
|
<p>KTHBYE</p>
|
|
|
|
<h4><a href="https://goatpr0n.farm/">Back to Home</a></h4>
|
|
</div>
|
|
|
|
|
|
</div><footer class="container">
|
|
<hr class="soften">
|
|
<p>
|
|
©
|
|
|
|
Julian Knauer
|
|
|
|
<span id="thisyear">2020</span>
|
|
|
|
</p>
|
|
<p class="text-center">
|
|
|
|
|
|
|
|
|
|
|
|
</p>
|
|
</footer>
|
|
|
|
<script src="/js/jquery.js"></script>
|
|
<script src="/js/bootstrap-386.js"></script>
|
|
<script src="/js/bootstrap-transition.js"></script>
|
|
<script src="/js/bootstrap-alert.js"></script>
|
|
<script src="/js/bootstrap-modal.js"></script>
|
|
<script src="/js/bootstrap-dropdown.js"></script>
|
|
<script src="/js/bootstrap-scrollspy.js"></script>
|
|
<script src="/js/bootstrap-tab.js"></script>
|
|
<script src="/js/bootstrap-tooltip.js"></script>
|
|
<script src="/js/bootstrap-popover.js"></script>
|
|
<script src="/js/bootstrap-button.js"></script>
|
|
<script src="/js/bootstrap-collapse.js"></script>
|
|
<script src="/js/bootstrap-carousel.js"></script>
|
|
<script src="/js/bootstrap-typeahead.js"></script>
|
|
<script src="/js/bootstrap-affix.js"></script>
|
|
<script>
|
|
_386 = {
|
|
fastLoad: false ,
|
|
onePass: false ,
|
|
speedFactor: 1
|
|
};
|
|
|
|
|
|
function ThisYear() {
|
|
document.getElementById('thisyear').innerHTML = new Date().getFullYear();
|
|
};
|
|
</script></body>
|
|
</html>
|