<div dir="auto">Rsync does have a service. I would suggest looking at it. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 8, 2020, 12:00 PM Matt Graham <<a href="mailto:mhgraham@crow202.org">mhgraham@crow202.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2020-02-07 11:20, Nathan (PLUGAZ) wrote:<br>
> On 2020-02-06 20:14, Matt Graham wrote:<br>
>> The "filefrag" utility will<br>
>> tell you how fragmented an individual file is. I don't see anything<br>
>> about defragging tools for ext234 in portage/sys-fs/ but<br>
> Defragging an ext4 filesystem is done with e4defrag<br>
<br>
Putting the important stuff at the end is called "burying the lede" and <br>
you're not supposed to do that. :-) What does e4defrag -c <br>
/dev/whatever tell you? My ext4 filesystems are all either 0 or 1 frag <br>
status, and the 1 frag was the one that's 87% full with a mix of file <br>
sizes. Defragging is supposed to be necessary only if the frag status <br>
goes over 30.<br>
<br>
>>> Now this is running over an NFS link<br>
>> What was the rsync displaying after 75 minutes?<br>
>> 46,000 files seems like it should take a minute or so unless it had <br>
>> to<br>
>> transfer all the files in full.<br>
> The volume on the server is mounted with noatime,nodiratime,noexec<br>
> The export on the server is (rw,sync,no_root_squash,no_subtree_check)<br>
<br>
OK, you may want to try async. I don't think it'll make much <br>
difference.<br>
<br>
> mount` shows the actual options as:<br>
> rw,noexec,noatime,nodiratime,vers=4.2,rsize=1048576,<br>
> wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,<br>
> sec=sys,fsc,local_lock=none<br>
> Both machines have their time synced.<br>
<br>
This is probably fine. I couldn't use 4.2 for some reason, had to <br>
leave it at 4.1, but I don't think this'll cause the problem you're <br>
seeing.<br>
<br>
> Reading files from the server to my desktop is as fast as I would<br>
> expect a gigabit network to be. Writing large files to the network<br>
> storage works as I expect. It's just all of these small files<br>
> that are killing me.<br>
<br>
I made an 8G ext4 LV on machine1, exported it via NFS, on machine2, I <br>
did "mount -t nfs 192.168.1.20:/mnt/rsynctemp /mnt/other -o (the options <br>
you had)" , then started rsyncing a 7.5G dir tree to /mnt/other from <br>
machine2. It *crawled* and the bottleneck was file creation, not <br>
fragmentation, since the filesystem had just been mkfs'ed. The <br>
combination of NFS and ext4's write barriers makes creating a file at <br>
least an order of magnitude slower than it would usually be. When the <br>
LV is mounted with ext4 defaults, rsyncing a 10,000 file directory of <br>
157M in size to an empty dir took 54 minutes. When the LV is mounted <br>
with nobarrier, doing that took 2 minutes. (Curiously, the same <br>
operation with the LV as ext3 is taking much longer even though ext3 <br>
doesn't do barriers. Of course, portage is compiling qtwebengine right <br>
now, which is hogging the CPU.)<br>
<br>
So: mount the thing with nobarrier if you want it to create many small <br>
files faster. This means that if the power goes out, your data will get <br>
corrupted. Your call. Or try running the rsync daemon on the NFS <br>
server, since NFS is good for reading, good for writing, and horrible <br>
for creating files? That'll show totally different network behavior <br>
since it removes NFS's weirdnesses.<br>
<br>
-- <br>
Crow202 Blog: <a href="http://crow202.org/wordpress" rel="noreferrer noreferrer" target="_blank">http://crow202.org/wordpress</a><br>
There is no Darkness in Eternity<br>
But only Light too dim for us to see.<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank" rel="noreferrer">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote></div>