Gentoo Archives: gentoo-user

From: Frank Steinmetzger <Warp_7@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] NAS and replacing with larger drives
Date: Sun, 18 Dec 2022 15:29:56
Message-Id: Y58x57SaZcYh4GR/@kern
In Reply to: Re: [gentoo-user] NAS and replacing with larger drives by Dale
1 Am Sun, Dec 18, 2022 at 09:12:37AM -0600 schrieb Dale:
2
3 > > On Sat, Dec 17, 2022 at 4:42 PM Dale <rdalek1967@×××××.com
4 > > <mailto:rdalek1967@×××××.com>> wrote:
5 > > <SNIP>
6 > > >
7 > > > My reasoning is simple, I'm already familiar with LVM and how to
8 > > manage it.  
9 > > <SNIP>
10 > > […]
11 > > Wipe the machine. You'll be happier.
12 > >
13 > > Best wishes,
14 > > Mark
15 >
16 > Well, I finally got it so I could do a backup.  I didn't need a hammer
17 > but the thought crossed my mind.  lol  Even tho I now have a 1GB network
18 > card, it's still really slow.  It shows up as a 1GB connection on both
19 > my Gentoo machine and the NAS machine.  This is a example of the speeds
20 > I'm seeing.  Just snippets. 
21 >
22 >
23 > 277,193,507 100%   16.18MB/s    0:00:16
24 > 519,216,571 100%   18.86MB/s    0:00:26
25 > 738,078,565 100%   23.54MB/s    0:00:29
26 >
27 >
28 > As you can see, the files sizes are large enough it should do better. 
29
30 Gbit nets at around 116..117 MB/s.
31
32 > When I use iftop, it shows it isn't doing anywhere near the speed it
33 > should, maybe 1/4th or so.  I'd expect at least double or triple that
34 > speed.  In all honesty, I'd think the hard drive would be the limiting
35 > factor.  Even on my Gentoo rig I only get about 50 to 60MBs/sec for
36 > encrypted drives.  I think the encryption slows that down.  When copying
37 > from a plain drive to a plain drive, I get 100MBs/sec or so. 
38 >
39 > I can't figure out why it is so slow tho.  The NAS rig is a 4 core CPU
40 > and 8GBs of memory.
41
42 OK, so you already noticed that encryption slows you down. This won’t happen
43 with a CPU that has AES instructions (well, and if the encryption you chose
44 actually uses AES, and not something else like Blowfish). So I guess your
45 CPU is too old, given your earlier descriptions.
46
47 When I built my NAS in November 2016, I installed a Celeron G1840 at first.
48 A very affordable (33 €) and frugal CPU (2 cores, 53 W, which were never
49 actually drawn). I knew it didn’t have AES back then (Intel removed that
50 limit from Celerons in architectures after Haswell), but from experiments I
51 knew it would achieve around 150..160 MB/s with LUKS, which was enough for
52 Gbit ethernet. But not for scrubs, when all HDDs were worked in parallel. So
53 after a year I did an upgrade after all and bought the smallest and cheapest
54 CPU that had AES, an i3-41xx.
55
56 > It should have enough horsepower under the hood. 
57 > Maybe it is something I'm not aware of.  It is a older rig so maybe it
58 > isn't SATA's fastest version, maybe even the original or something.  I
59
60 SATA 2 is 3 Gbit/s, so still not saturated by a single HDD.
61
62 Network transfers are single-core work. If it is really such an old machine,
63 I guess the CPU is the bottleneck again. Do you transfer via ssh? If so, use
64 something else that doesn’t encrypt the transport stream. When I am bound by
65 CPU in such cases (like with my ancient netbook with an Atom N450), and I
66 don’t want to set up a file server (that is nowhere near as flexible as ssh
67 anyways), I use netcat:
68
69 On the receiving end, start a netcat listener and extract from it:
70 nc -l -p $Portnumber | tar xf -
71 The portnumber must be any number above 1024, if you’re not root.
72
73 And on the sender, pack all your stuff into a tar (uncompressed!, since
74 videos aren’t compressible further and it will bog down the CPU again) and
75 pipe it to the receiver:
76 tar cf - * | nc $Destination_IP $Portnumber
77
78 Once the client is done, press Ctrl+C on the receiver.
79
80 Or maybe use rsync with the rsync-protocol instead of ssh. That’ll be more
81 flexible, because the tar-and-nc method doesn’t know about existing files on
82 the receiving end. (But I’ve never tested that approach.)
83
84 --
85 Grüße | Greetings | Salut | Qapla’
86 Please do not share anything from, with or about me on any social network.
87
88 You sould borrow money only from pessimists, because they don’t expect it back.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] NAS and replacing with larger drives Dale <rdalek1967@×××××.com>