The officially official Devuan Forum!

You are not logged in.

#1 2022-04-21 19:58:02

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

[SOLVED] rsync operation takes ages

Hello:

For backing up what I have in my box I use two applications: Timeshift and BackInTime.

Timeshift takes system snapshots and BackInTime takes /user/home snapshots with the usual exclusions.
It has always worked quite well.

Up to now, all the generated snapshots were stored on a separate 2.5" SATA 500Gb drive rigged into the box.
It has one partition and two directories: /media/bkups/backintime and /media/bkups/timeshift.

This was not the ideal solution and after procrastinating for the longest while got a 1TB NAS to back-up the contents of that 500Gb drive.
The back-up drive inside the box is 38% used ie: 174GiB / 457GiB according to my conky panel.

Late yesterday I set about doing the first rsync from my box to the NAS.

[root@devuan ~]# rsync -a -stats ~/media/bckups root@192.168.1.3:/mnt/sda3

I started it @22:55 last night and it is still going ...   @17:00 ! 

I understand that a first sync to an empty drive takes much longer and that file size ie: a great many small files can make the operation last a lot longer.

But it's been almost 18 hours.
Maybe I should have cp'd everything over first?

The conky panel says:

Outgoing: 6.57MiB /s      total: 410GiB

Does that not seem like a lot of overhead?

Thanks in advance,

A.

Offline

#2 2022-04-21 23:05:17

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: [SOLVED] rsync operation takes ages

I'm getting 11MB/s with rsync or sftp on the local network, Cat6 with gigabit router.

USB is faster, but that requires getting out of the chair.

Offline

#3 2022-04-22 00:03:39

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

fsmithred wrote:

... 11MB/s with rsync or sftp on the local network, Cat6 with gigabit router.

My telco provided ADSL router config page says that LAN/WAN speed in both ports (my box and the NAS) is 100M/Full.

My box has an on-board 82566DM-2 Gigabit Network adapter.     
The WD My Book NAS has a Gigabit Ethernet port.

Seems the problem is the bloody router as everything goes through there.
No wonder.

Can't change the telco router. I'd lose my landline.

Any suggestions?

Thanks in advance.

Best,

A.

Offline

#4 2022-04-22 02:14:08

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: [SOLVED] rsync operation takes ages

For the initial transfer, maybe you can bypass the router and connect one box to the other. You'd have to set static IP adresses and use the address on the remote box as the gateway on the local box. Since they're both gigabit connections, you don't need a crossover cable. A regular one will do.

Sometimes rebooting a router will help if it's been doing a lot of work.

If you do a lot of local transfers, you could add a faster router to the slower one and keep your local net on the faster one.

Not sure about how the phone works, but it might be possible to set the modem-router to bridged mode so it acts like a plain modem and use your own router off of that.

Offline

#5 2022-04-22 07:45:35

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

fsmithred wrote:

For the initial transfer, maybe you can bypass the router ...

Yes, that would work.
But it's rather a hassle to do the setup.

fsmithred wrote:

... you could add a faster router ...

I've been looking at second hand 4/5 port gigabit routers and desktop switches to plug in all my gear ie: box, netbook and NAS.
Nothing into the router save the new router/switch.

That way the link from box to NAS would go through the GB router/switch and not through the telco router with the 100M ports.
Am I correct?

If so, maybe just a 'dumb' desktop switch would do the trick?

fsmithred wrote:

Not sure about how the phone works but it might be possible ...

I am having a contentious issue with the local telco regarding VoIP, which they are intent in shoving down my throat.
I don't want it but they insist, to the point of threatening to cut my land line and leave me without a phone.

So I'd rather not muck with the ADSL router's setup.
They have a habit of resetting it remotely and screwing up the DNS settings pointing to a VM running inside my box (Pi-Hole+Unbound).

Think a 'dumb' switch may do well enough?

Thanks for your input.

Best,

A.

Offline

#6 2022-04-22 09:46:11

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: [SOLVED] rsync operation takes ages

Altoid wrote:

That way the link from box to NAS would go through the GB router/switch and not through the telco router with the 100M ports.
Am I correct? If so, maybe just a 'dumb' desktop switch would do the trick?

My set up had been very similiar to yours, but nowadays my router is also GB; anyway: for years my router has been only 100M.

You are correct, any simple GB switch would be fine. Depending of your needs and budget, you can choose a model with 4 up to 16 ports.

Another option I used was installing a second GB network card both in the client and the server and get a direct conexion. Speed transfer was twice than through the switch, but I don't need so much speed now.

And the first copy can be very time expensive, as you are experiencing, so I do it using a SATA case attached to the main computer. It can be troublesome, but only when you set it up, later it paids off.

Offline

#7 2022-04-22 11:18:31

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

PedroReina wrote:

... had been very similiar to yours ...

Probably with the same infamous Telefonica ADSL routers. 8^|

PedroReina wrote:

You are correct ...
... with 4 up to 16 ports.

Great.
But I have no need for more than 4 ports at the moment.
Unless I get a very good price for one with more.

Thanks a lot for for your input.

Best,

A.

Offline

#8 2022-04-22 15:09:20

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: [SOLVED] rsync operation takes ages

Altoid wrote:

Probably with the same infamous Telefonica ADSL routers. 8^|

No Telefónica staff at home smile

Offline

#9 2022-04-25 14:04:55

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] rsync operation takes ages

Disable encryption for rsync operations over ssh or use rsh instead of ssh (but only do the latter on a local network because it's not very secure).


Brianna Ghey — Rest In Power

Offline

#10 2022-04-25 18:16:34

thierrybo
Member
Registered: 2017-11-11
Posts: 107  

Re: [SOLVED] rsync operation takes ages

For your information, I backup my desktop and nas with rclone ("rsync for the cloud") to an "OpenStack Swift" provider and I ask rclone to encrypt data.

When I start a backup, it takes on week to complete on the nas ans 2 days on my computer ....

Offline

#11 2022-04-25 20:34:35

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

Head_on_a_Stick wrote:

Disable encryption for rsync operations over ssh ...

Altoid wrote:

My box has an on-board 82566DM-2 Gigabit Network adapter.     
The WD My Book NAS has a Gigabit Ethernet port.

---

Altoid, several days later wrote:

Forgot to mention that at this point I purchased/installed a four/five port unmanaged Gb switch (TL-SG105).

---

Part of this problem had to do with the CAT5e cables I was using.
Found out when I used ethtool to check the on-board ethernet adapter on the NAS and saw it was reporting 100M:

root@OpenWrt:~# ethtool eth0
Settings for eth0:
--- snip ---
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 100Mb/s    <-------------------------- #####
    Duplex: Full
--- snip ---
root@OpenWrt:~# 

With a set of new CAT5e cables and properly negotiating 1000Mb/s between my box and the NAS, I tested the link with iperf:

root@OpenWrt:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.3 port 5001 connected with 192.168.1.2 port 35408
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec   771 MBytes   645 Mbits/sec
root@OpenWrt:~# 
groucho@devuan:~$ iperf -c 192.168.1.3
------------------------------------------------------------
Client connecting to 192.168.1.3, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.2 port 35408 connected with 192.168.1.3 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   771 MBytes   646 Mbits/sec
pcl@devuan:~$ 

Good enough, I guess.

But I was expecting something like the 94Mb /s I get between the NAS and my netbook which has a 10/100 ethernet adapter.
ie: if with a 10/100 connection I can get 94% of 100M, I was expecting at least 85% from the box to NAS connection at 1000M - 850 Mbits /s instead of 645 Mbits /s.

I'm assuming it is proportional, it probably isn't.

I've just finished running the same rsync job that took over 18 hours (first time/empty destination) the last time I ran it ie: before switching all the patch cables for new CAT5e ones and as a result getting the iperf speeds reported above, 646 Mbits/sec

All through the job, my conky panel reported a speed of ~7.45MiB /s

    Incoming: 114KiB /s
    Outgoing: 7.46MiB /s

These were the NAS's CPU/Memory loads during the job:

PID   Owner  CPU   Mem    Process
 213  root    9%    0%    kswapd0
1904  root   67%    0%    Dropbear
1905  root    0%    7%    rsync  --server
1906  root   22%   13%    rsync  --server

My guess is that NAS's CPU is totally maxed out.
ie: just kswap 9% + dropbear 67% + rsync 22% =>>> 98%

dropbear is the SSH2 server/client included in OpenWRT installation image, only 82k.
Evidently, with this hardware* a 67% CPU load is rather expensive to run.

*Applied Micro APM82181 @800 MHz + 256 MB RAM

Head_on_a_Stick wrote:

... use rsh instead of ssh (but only do the latter on a local network ...

I don't really neeed encryption as it is all local traffic.
ie: going nowhere else but from a back-up drive inside my box to the NAS under my desk.

But I do need rsync.
I use ssh to login to the NAS, how do I disable encryption?

Have never used/heard of rsh, have to look it up.

Thank you very much for your input.

Best,

A.

Last edited by Altoid (2022-04-27 11:42:34)

Offline

#12 2022-04-25 20:37:23

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

thierrybo wrote:

... backup my desktop and nas with rclone ("rsync for the cloud") ...

Hmm ...
Sorry, I don't do anything cloudy and have no trust in that type of thing.
But that's just me, YMMV.

Notwithstanding, thank you very much for your input. ;^)

Best,

A.

Last edited by Altoid (2022-04-25 23:14:45)

Offline

#13 2022-04-26 08:38:49

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] rsync operation takes ages

Altoid wrote:

But I do need rsync.
I use ssh to login to the NAS, how do I disable encryption?

Oops, sorry, looks like you can't actually disable encryption over ssh but you can use a simple cipher like Blowfish, which should be quick, along with no compression:

# rsync -e "ssh -o compression=no -c blowfish" -a -stats ~/media/bckups root@192.168.1.3:/mnt/sda3

Reference: https://galaxysd.github.io/20160302/Fastest-Way-Rsync

For transfers without encryption use rsh instead, as supplied by the rsh-client & rsh-server packages (/usr/bin/netkit-rsh & /usr/bin/netkit-rshd).

Last edited by Head_on_a_Stick (2022-04-26 08:44:56)


Brianna Ghey — Rest In Power

Offline

#14 2022-04-26 16:03:18

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

Head_on_a_Stick wrote:

... can't actually disable encryption over ssh ...
... use a simple cipher like Blowfish ...

# rsync -e "ssh -o compression=no -c blowfish" -a -stats ~/media/bckups root@192.168.1.3:/mnt/sda3

I'm afraid that dropbear does not do blowfish.

~$ rsync -e "ssh -o compression=no -c blowfish" -a --stats /media/bckups root@192.168.1.3:/mnt/sda3
Unknown cipher type 'blowfish'
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
~$ 

See: https://dropbear.nl/mirror/CHANGES

CBC ciphers, 3DES, hmac-sha1-96, and x11 forwarding are now disabled by default.
They can be set in localoptions.h if required.
Blowfish has been removed.

Head_on_a_Stick wrote:

... without encryption use rsh instead, as supplied by the rsh-client & rsh-server packages ...

Unfortunately, I have not found the rsh package in the OpenWRT repository so that's a dead end.

Looking around for similar situations, I found this:

https://www.glidk.com/2021/12/22/benchm … ppy-router

It's a post by a chap using a small travel router with a lower spec than the WD-MBL:

Brand/Name		WD-MBL		GL-AR750
CPU:			PowePC 44x     Qualcomm Atheros
Model:			APM82181	QCA9531
CPU Cores:		1		1
CPU MHz:		800		650       <----- #
Flash Mb:		512		16
RAM MB:			256		128       <----- #
BogoMIPS:		1600		432.53    <----- # 

It would seem that he achieved speeds using just the rsync protocol and bypassing ssh.
I don't undertand how he's set this up and cannot find how to contact the guy.

The WD-MBL, save for the HDD/SD card difference, seems to be much heftier.
Could I be able to get at least his 10.0Mb/s?

Can you make any sense of what he's done there?

Thanks in advance.

A.

Offline

#15 2022-04-26 17:34:36

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] rsync operation takes ages

Altoid wrote:

It would seem that he achieved speeds using just the rsync protocol and bypassing ssh.
I don't undertand how he's set this up and cannot find how to contact the guy.

Looks like https://wiki.archlinux.org/title/Rsync#As_a_daemon


Brianna Ghey — Rest In Power

Offline

#16 2022-04-26 19:04:57

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

Ahh ...

Thanks a lot for that. ;^ )
I'll have a look and see what I get from using that method.

Best,

A.

Offline

#17 2022-04-27 08:45:12

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 582  

Re: [SOLVED] rsync operation takes ages

Hi, for what it's worth, I used to use an old 4 port modem/routrer as a switch.

I found, without the external phone line connected (I can't remember if it was adsl or dsl) it acted as though it was not a modem.

giving me 4 extra eth ports (it was some time ago)

all the best.


pic from 1993, new guitar day.

Offline

#18 2022-04-27 11:19:01

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: [SOLVED] rsync operation takes ages

GlennW wrote:

I used to use an old 4 port modem/routrer as a switch.

I think that this is a really good piece of advice. I'm using right now an old router as an WiFi access point. But it the router is too old, maybe the switch could only cope with 100 Mbps. Modern routers can get up to 1Gbps. Anyone interested should check this out.

Offline

#19 2022-04-27 11:53:51

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [SOLVED] rsync operation takes ages

Hello:

GlennW wrote:

... an old 4 port modem/routrer as a switch.

PedroReina wrote:

... a really good piece of advice.

Indeed ...
I had first looked into that option. (See updated post @2022-04-25 17:34:35)

Locally, a used (decent quality) Gb router would cost me a bit more than what I paid for a four/five port unmanaged Gb switch.   
So I got one of those. Plug everything up, power it and that's it. Just works.

It has a metal case and is unobstusive (100*98*25) so that once I threw it under the desk, I forgot all about it.
Slipped my mind and neglected to mention it in the post, maybe the old cache is acting up.

Sorry about that.

Thank you both for your input.

Best,

A.

Last edited by Altoid (2022-04-27 12:04:31)

Offline

Board footer