duncansmart/sqlpipe

Benchmark / Slow Output

basti12203 opened this issue · 2 comments

Hello,
first off all thanks for this great tool. I use it to encrypt SQL Backup on the fly.
Now I do some benchmark / debug to find the bottleneck.

My System is a Win2008R2 64bit with dualcore and ssd, SQL Server 10.50.
When I do a backup with SSMS the speed is round about 86 MB/s.
With sqlpipe I get 10-33 MB/s. sqlpipe is only 32bit but I do not think that this is the problem.

To reproduce it:
sqlpipe backup myDB -q | pv -s 10G > NUL
pv (Pipe Viewer) is part of cygwin.

Have you any ideas why it is so slow?

p.s. on Win2019with dualcore and ssd, SQL Server 14.0 I get 50-200 MB/s with sqlpipe

Sorry, I don't know. I wonder if it's general overhead of the VDI interface in general. All the code does is take bytes that come in and write the directly to the output stream. The only slowdown I've seen is when you don't use the -q option, but I see you're using that already.

It could be the sql server. The Disk Performance with HDDTune is avg 110 MB/s.
But do not understand, why it is much faster, when I use
sqlcmd.exe
with an sql file like
BACKUP DATABASE myDB TO DISK= ... WITH INIT, NAME = N'foobar'.
Whith this I get avg 86 MB/s