Filestream performance issues

  • I'm testing using the filestream capabilities of SQL 2008 and am seeing strange behavior that maybe someone can help shed some light on. I'm inserting several thousands blobs (of very small size 5-30KB) into a filestream table. Querying the table is fine (if a little slow but I know that retrieving data from a varbinary(max) that is filestreamed is going to be half as slow), but at a point all querying stops and it starts throwing me into these wait types of PREEMPTIVE_OS_ which are operating systems waits. I'm assuming that the OS can't read/write to the directory structure due to the amount of files in the filestream filegroup.

    Is there something in the filestream configuration that I'm missing? Can this folder be partitioned out into subfolders so whatever win32 api that sql server is using to get the files doesn't choke like explorer does when displaying the file list?

    I like the new feature but if it can't handle 20,000 blobs of small size what good is it?

  • I am trying to get a better understanding of your environment. Is your Filestream directory located on a dedicated disk resource or are you sharing with something else? Also how are the disks formatted? (Fat32, NTFS).

  • Older laptop running xp and ntfs. The disk isn't shared, single user for a small desktop app. I can understand it being slow but it comes to grinding halt...

  • Chris Gierlack (7/9/2009)


    Older laptop running xp and ntfs. The disk isn't shared, single user for a small desktop app. I can understand it being slow but it comes to grinding halt...

    :w00t: I find it quite suspicious that an "Older laptop running XP" has more than one Physical Disk resource, meaning it would be sharing IO. If you have a means to test on a machine where you can split your filestream location, from your database files, and OS pagefile (On separate physical disks, or logical disks made up of separate physical disks) you can get a better idea of what is causing your IO contention.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply