mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
Fileserver: Don't sync every 10 seconds
The patch which moved our calls to fsync into the background, added a sync prior to each batch of fsync calls. This is an incredibly bad idea. POSIX says that sync "shall cause all information in memory that updates file systems to be scheduled for writing out to all file systems". On Linux this means that we in effect perform an fsync() on every open filehandle on the entire system, and in addition flush all superblocks and journals out to disk. This makes the following fsync() calls superfluous - sync() will have already written out all of the data. Add to this the fact that the fileserver is doing this every 10 seconds, and this becomes a major performance bottleneck, particularly if the machine uses a journalled fs - as any disk operations will end up blocking whilst the journal is written to disk. Change-Id: Id06cb99ae83af2e4a82e7b20fb14b8457dc16883 Reviewed-on: http://gerrit.openafs.org/1977 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Rainer Toebbicke <rtb@pclella.cern.ch> Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
54bf41004b
commit
5ea24a7c55
@ -984,9 +984,6 @@ ih_sync_thread(void *dummy) {
|
||||
IOMGR_Sleep(60);
|
||||
#endif /* AFS_PTHREAD_ENV */
|
||||
|
||||
#ifndef AFS_NT40_ENV
|
||||
sync();
|
||||
#endif
|
||||
ih_sync_all();
|
||||
}
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user