Bug 4433 - Samba over NFS Performance Problems in case of big files
Summary: Samba over NFS Performance Problems in case of big files
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.24
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 04:41 UTC by Thomas Wild
Modified: 2007-03-06 05:35 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wild 2007-03-06 04:41:09 UTC
In case of have "Samba over NFS Transfer" with two different servers, big files transfer take a long time (2GB Files estimateted 45 -60 minutes). In case of Samba storing the file directly on a local disk, it takes not more than 7 min. which is a good time. Tested on Linux SusE 10.1 and Solaris 8+10.

I found that the reason for that in the utime() call in smbd/vfs-wrap.c line  620. If I remove this line and put:

int vfswrap_utime(vfs_handle_struct *handle,
                  connection_struct *conn,
                  const char *path, struct utimbuf *times)
{
        int result;
        START_PROFILE(syscall_utime);
--->>   result = 0;             /* Thomas Wild - Patched for Smb over NFS */
        END_PROFILE(syscall_utime);
        return result;
}

in, it speeds up 10 times the transfer to 6 minutes for a 2GB.

Watching by sniffer:
snoop rpc nfs
 server2-> server1  NFS R WRITE3 OK 16384 (ASYNC)
 server1-> server2  NFS C GETATTR3 FH=51C0
 server2-> server1  NFS R GETATTR3 OK
 server1-> server2  NFS C WRITE3 FH=51C0 at 17006592 for 16384 (FSYNC)

where FSYNC seems to be the problem which caused by utime call!



In my opinion, but I'm not sure, this call is not really necessary. It causes a lot of FSYNC over NFS and delays the transfer dramatically. After I removed this line, the speed increased 10 times without any side effects. So my question is this behavior intended or a bug?

My proposal is to make this function call adjustable in smb.conf or bypass it for NFS?

Thanks in advance.

- Thomas
Comment 1 Volker Lendecke 2007-03-06 05:35:47 UTC
Re-exporting NFS imported shares is definitely not recommended. You are always free to write your own little vfs module that just overrides this operation.

Volker