Database backup using Nbackup is getting slow when directed to NAS over SMB
protocol
------------------------------------------------------------------------------------
Key: CORE-4913
URL: http://tracker.firebirdsql.org/browse/CORE-4913
Project: Firebird Core
Issue Type: Improvement
Components: NBACKUP
Affects Versions: 3.0 Beta 2, 2.5.4, 2.5.3 Update 1, 2.1.7, 3.0 Beta 1,
2.5.3, 2.1.6, 3.0 Alpha 2, 3.0 Alpha 1, 2.5.2 Update 1, 2.1.5 Update 1, 2.5.2,
2.5.1, 2.5.0, 3.0 RC 1, 2.5.5, 4.0 Initial, 3.0.0
Environment: Windows Server 2003 32 bit, 1Gbit ethernet, NAS QNAP
ts-439 RAID 5
Reporter: Jan Hejda
Priority: Minor
After a few years of running well, the backup of 60GB database suddenly slowed
down during one month from 2.5 hours to 24 hours.
It was slow only for that Linux based NAS, the speed for Windows shared
directories was about 2.5 hours.
After below described change I achieved the speed allowing the same backup to
be done within 40 minutes.
In the function void nbackup::create_backup() in the function call CreateFile I
changed the flag GENERIC_WRITE to GENERIC_READ | GENERIC_WRITE.
The reason for the change is described in MSDN
(https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx):
When an application creates a file across a network, it is better to use
GENERIC_READ | GENERIC_WRITE for dwDesiredAccess than to use GENERIC_WRITE
alone. The resulting code is faster, because the redirector can use the cache
manager and send fewer SMBs with more data. This combination also avoids an
issue where writing to a file across a network can occasionally return
ERROR_ACCESS_DENIED.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel