Re: News server switchover sometime next week
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
2012-04-08 00:08:24 GMT
D'oh.
So, basically, I'm doing the mop-up sweep by doing a readdir on the
destination (i.e., /mirror/var/spool/news/articles/gmane/discuss, for
instance), and then on the source (an nfs-mounted
/var/spool/news/articles/gmane/discuss), and then seeing what files are
missing/should be deleted.
The idea being that readdir would need no stat()-ing, so it should be
fast.
But then I thought... what if the main problem here is that readdir
over NFS is just bone slow? Reading huge directories over NFS probably
isn't the most benchmarked thing in the world.
So I tried mounting via sshfs instead. Faster, but still kinda slow.
One positive effect was that the load on the server went down from 16 to
7, though, so, hey, win!
Then I straced sshfs (i.e., sftp-server) just for kicks, just to see
what it's doing while doing a readdir. It did this fucking thing for
every file in the directory!
gettimeofday({1333843231, 411240}, NULL) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2225, ...}) = 0
lstat("/var/spool/news/articles/gmane/discuss/8111", {st_mode=S_IFREG|0644, st_size=4502,
...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2225, ...}) = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 6
lseek(6, 0, SEEK_CUR) = 0
(Continue reading)