17.07.2015 Views

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 12: Planning, Configuration and Best PracticesInitially, I was surprised that, when the test was run with short file names enabled, theduration went up with each lap (up to Lap 9) and then fell down to 3 seconds from 106.<strong>The</strong> same happened at Lap 19 too. <strong>The</strong>n I realized that the delay has to do with theamount <strong>of</strong> data NTFS has to look at before creating a new file. After Lap 9, the file namepattern changed and the same happened after Lap 19. It indicates that not only thenumber <strong>of</strong> files in the folder, but also the way files are named, affects the performancewhen short file names are enabled.<strong>SQL</strong> <strong>Server</strong> names <strong>FILESTREAM</strong> data files based on the LSN that created the<strong>FILESTREAM</strong> data file. Based on the workload and usage pattern on your server, the filenames on disk may or may not follow a specific pattern. <strong>The</strong> system overhead to createshort file names depends on the number <strong>of</strong> files with similar names in the same folder.If the file names created are similar, you might notice a performance difference afterdisabling short file names. It is important to note that the impact <strong>of</strong> short file namescomes into the picture only when new files are created. If your application does not createnew files, the impact <strong>of</strong> the change may <strong>of</strong>ten not be noticeable.Compressing <strong>FILESTREAM</strong> dataWhen data is compressed, the I/O pressure on the system is reduced because less datais read from, and written to, the disk. On the other hand, CPU usage increases becausethe storage engine has to compress the data before writing to the disk, and decompressit on reading. Depending upon your workload, CPU, and I/O subsystem capabilities,compression may or may not help. In most cases, I have seen that compression helps ifthe data is compressible.<strong>The</strong> <strong>SQL</strong> <strong>Server</strong> row- and page-level compression feature does not compress<strong>FILESTREAM</strong> data files. However, <strong>SQL</strong> <strong>Server</strong> allows <strong>FILESTREAM</strong> data files to be storedon compressed disk volumes. This will reduce the storage space needed for the data. <strong>The</strong>decision to go with compressed <strong>FILESTREAM</strong> storage should be taken only after clearly443

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!