public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Laurence Perkins <lperkins@openeye.net>
To: "gentoo-user@lists.gentoo.org" <gentoo-user@lists.gentoo.org>
Subject: RE: [gentoo-user] Getting maximum space out of a hard drive
Date: Mon, 22 Aug 2022 14:50:25 +0000	[thread overview]
Message-ID: <MW2PR07MB405850C442698D47B640730FD2719@MW2PR07MB4058.namprd07.prod.outlook.com> (raw)
In-Reply-To: <ed694361-f411-8062-b033-d4bae176868b@spamtrap.tnetconsulting.net>

Note that 60ish MB/sec is very reasonable for a rotational drive.  They *can* technically go faster, but only if you keep the workload almost entirely sequential.  Most filesystems require a fair amount of seeking to write metadata, which slows them down quite a bit.

If you're desperate for performance, you can do things like tell it to ignore write barriers and turn off various bits of flushing and increase the amount of allowed dirty write cache.  These can be good for a significant performance boost at the cost of almost certainly corrupting the filesystem if the system loses power or crashes.

LMP

-----Original Message-----
From: Grant Taylor <gtaylor@gentoo.tnetconsulting.net> 
Sent: Saturday, August 20, 2022 2:57 PM
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Getting maximum space out of a hard drive

Sorry for the duplicate post.  I had an email client error that accidentally caused me to hit send on the window I was composing in.

On 8/20/22 1:15 PM, Dale wrote:
> Howdy,

Hi,

> Related question.  Does encryption slow the read/write speeds of a 
> drive down a fair amount?

My experience has been the opposite.  I know that it's unintuitive that encryption would make things faster.  But my understanding is that it alters how data is read from / written to the disk such that it's done in more optimized batches and / or optimized caching.

This was so surprising that I decrypted a drive / re-encrypted a drive multiple times to compare things to come to the conclusion that encryption was noticeably better.

Plus, encryption has the advantage of destroying the key rendering the drive safe to use independent of the data that was on it.

N.B. The actual encryption key is encrypted with the passphrase.  The passphrase isn't the encryption key itself.

> This new 10TB drive is maxing out at about 49.51MB/s or so.

I wonder if you are possibly running into performance issues related to shingled drives.  Their raw capacity comes at a performance penalty.

> I actually copied that from the progress of rsync and a nice sized 
> file.  It's been running over 24 hours now so I'd think buffer and 
> cache would be well done with.  LOL

Ya, you have /probably/ exceeded the write back cache in the system's memory.

> It did pass both a short and long self test.  I used cryptsetup -s 512 
> to encrypt with, nice password too.  My rig has a FX-8350 8 core 
> running at 4GHz CPU and 32GBs of memory.  The CPU is fairly busy.  A 
> little more than normal anyway.  Keep in mind, I have two encrypted 
> drives connected right now.

The last time I looked at cryptsetup / LUKS, I found that there was a [kernel] process per encrypted block device.

A hack that I did while testing things was to slice up a drive into multiple partitions, encrypt each one, and then re-aggregate the LUKS devices as PVs in LVM.  This surprisingly was a worthwhile performance boost.

> Just curious if that speed is normal or not.

I suspect that your drive is FAR more the bottleneck than the encryption itself is.  There is a chance that the encryption's access pattern is exascerbating a drive performance issue.

> Thoughts?

Conceptually working in 512 B blocks on a drive that is natively 4 kB sectors.  Thus causing the drive to do lots of extra work to account for the other seven 512 B blocks in a 4 kB sector.

> P. S.  The pulled drive I bought had like 60 hours on it.  Dang near new.

:-)



--
Grant. . . .
unix || die


  parent reply	other threads:[~2022-08-22 14:50 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 18:04 [gentoo-user] Getting maximum space out of a hard drive Dale
2022-08-18 18:18 ` Rich Freeman
2022-08-19  2:03   ` Dale
2022-08-19  4:26     ` David Haller
2022-08-24 22:45       ` Frank Steinmetzger
2022-08-25  6:22         ` William Kenworthy
2022-08-25 12:43           ` Dale
2022-08-25 12:52             ` Rich Freeman
2022-08-25 15:10               ` Jack
2022-08-25 18:59                 ` Dale
2022-08-25 21:08                   ` Rich Freeman
2022-08-25 23:59                     ` Dale
2022-08-26  0:15                       ` Mark Knecht
2022-08-26 11:26                         ` Dale
2022-08-26 11:55                           ` Gerrit Kuehn
2022-08-26 12:07                           ` Rich Freeman
2022-08-26 23:07                             ` Dale
2022-08-26 14:09                           ` Mark Knecht
2022-08-26 14:25                             ` Rich Freeman
2022-08-26 14:40                               ` Mark Knecht
2022-08-26 23:20                                 ` Dale
2022-08-26 23:37                                   ` Mark Knecht
2022-08-27  1:16                                     ` Mark Knecht
2022-08-27 23:30                                       ` Dale
2022-08-28  9:27                                         ` Michael
2022-08-28 21:07                             ` Frank Steinmetzger
2022-08-28 21:33                               ` Wol
2022-08-28 21:53                                 ` Mark Knecht
2022-08-28 23:31                                   ` Wol
2022-08-28 21:34                           ` Frank Steinmetzger
2022-08-29  5:49                             ` Dale
2022-08-29 14:42                               ` Frank Steinmetzger
2022-08-29 21:28                                 ` Dale
2022-08-30 14:26                                   ` Frank Steinmetzger
2022-08-25 22:41                   ` Wols Lists
2022-08-25 23:56                     ` Dale
2022-08-26  7:24                       ` Wols Lists
2022-08-26 11:27                         ` Dale
2022-08-26 13:35                           ` Wols Lists
2022-08-26  4:47                   ` David Haller
2022-08-18 18:20 ` Andreas Fink
2022-08-20 19:15 ` Dale
2022-08-20 20:57   ` Rich Freeman
2022-08-25  3:44     ` Dale
2022-08-20 21:46   ` Grant Taylor
2022-08-20 21:57   ` Grant Taylor
2022-08-20 22:45     ` Dale
2022-08-21  4:22       ` William Kenworthy
2022-08-21  5:34         ` Grant Taylor
2022-08-21  9:26           ` William Kenworthy
2022-08-21 10:09         ` Dale
2022-08-21 16:47           ` Dale
2022-08-21  5:27       ` Grant Taylor
2022-08-24 22:39       ` Frank Steinmetzger
2022-08-24 22:50         ` Wol
2022-08-22 14:50     ` Laurence Perkins [this message]
2022-08-22 15:02       ` Rich Freeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW2PR07MB405850C442698D47B640730FD2719@MW2PR07MB4058.namprd07.prod.outlook.com \
    --to=lperkins@openeye.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox