GNU bug report logs - #7389
rename() over NFS

Previous Next

Package: coreutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Sat, 13 Nov 2010 11:55:02 UTC

Severity: normal

Tags: patch

Merged with 7394

Full log


Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Bruno Haible <bruno <at> clisp.org>
Cc: bug-gnulib <at> gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>, bug-coreutils <at> gnu.org,
	Eric Blake <eblake <at> redhat.com>
Subject: Re: rename() over NFS
Date: Sat, 13 Nov 2010 15:30:48 +0100
Bruno Haible wrote:
> Jim Meyering wrote:
>> if you see ways to improve things without impacting performance
>> or maintainability, I'm all for it.
>
> Maintainability wouldn't be impacted, because the fix would be to use
> lib/rename.c, with
>   #define RENAME_DEST_EXISTS_BUG 1
>   #define RENAME_HARD_LINK_BUG 1
>
> But performance would be impacted, since 2 lstat() calls would happen
> before every rename().

That sounds like it would be excessive.
Currently, moving 100 regular files into a subdir
incurs 100% of its time in 100 rename and 200 stat calls:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 79.69    0.000051           1       100           rename
 20.31    0.000013           0       200       100 lstat
  0.00    0.000000           0         8           read

Adding a rename wrapper and doubling the number of lstat calls
per file would represent a significant slow-down.




This bug report was last modified 12 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.