Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Impact of multiple user database files? Expand / Collapse
Author
Message
Posted Friday, March 14, 2014 1:55 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:34 PM
Points: 499, Visits: 572
My company recently migrated to new hardware. The decision was made to create a database file per core per filegroup so now the database is spread across > 80 files. All of these files reside on one RAID10 volume. I cannot find any evidence online to support this configuration for a user database (only tempDB and even then its 1/2 to 1/4 the number per core). Is this configuration ok or is there something we should look at specifically to see if it is causing performance issues?
Post #1551343
Posted Friday, March 14, 2014 2:32 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 3:17 AM
Points: 3,017, Visits: 3,105
What is the size of your database?
Do you have 80+ RAID10 volumes?
You're good with the tempdb files. Start with 1/4 and add up to 1/2 (the number of cores) if necessary.
This survey is pretty good - http://www.sqlskills.com/blogs/paul/files-and-filegroups-survey-results/

Regards,
Igor Micev




Igor Micev,
SQL Server developer at Seavus
www.seavus.com
Post #1551366
Posted Friday, March 14, 2014 2:37 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:34 PM
Points: 499, Visits: 572
Database was ~250GB but then was sized up to 750GB to avoid auto-grow so there is a ton of free space in there.

All files reside on a single RAID10 volume. This setup would have made more sense to me if each file was on its own set of drives but that is not the case.
Post #1551368
Posted Friday, March 14, 2014 2:43 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 6:05 AM
Points: 40,258, Visits: 36,681
The one database file per core recommendation is an outdated one for TempDB only. It's never been a recommendation for user databases and even for TempDB now it's 1/4-1/2 the number of cores, max 8 to start.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1551373
Posted Friday, March 14, 2014 2:47 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 3:17 AM
Points: 3,017, Visits: 3,105
80+ filegroups is too much for that size of a database.
80+ files is also a big number, but it's more normal for files.
There are benefits of having multiple filegroups. Do you have a reason for having such many filegroups?

I've worked on 100-500GB databases. They were having 15-20 filegroups and double number of files.
However you can see in the survey that there are databases like yours.




Igor Micev,
SQL Server developer at Seavus
www.seavus.com
Post #1551376
Posted Friday, March 14, 2014 2:52 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:34 PM
Points: 499, Visits: 572
Igor Micev (3/14/2014)
80+ filegroups is too much for that size of a database.
80+ files is also a big number, but it's more normal for files.
There are benefits of having multiple filegroups. Do you have a reason for having such many filegroups?

I've worked on 100-500GB databases. They were having 15-20 filegroups and double number of files.
However you can see in the survey that there are databases like yours.


Sorry I wasn't very clear. There are four file groups all residing on one RAID10 volume:

Primary: one file
Filegroup2: forty files
Filegroup3: forty files
Filegroup 4: one file

I was told that this was done to reduce read and write latency but i just can't find any evidence that this is correct.
Post #1551379
Posted Friday, March 14, 2014 2:55 PM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, October 17, 2014 9:18 AM
Points: 77, Visits: 217
There's no need for 80 database files for a user database. This gives you no performance benefit at all. All you are doing is making the database very hard to manage when it comes to moving the database to another drive, server, restoring the database, etc.

I would highly recommend removing the extra database files from the database. One file per LUN is all you need. I've got clients with 3TB databases and only two data files and they perform just fine.

99.9% of SQL instances need no more than 8 files for tempdb. The only reason to have more than 8 tempdb database files is because you are seeing latch waits for PFS pages (or GAM, but that's even less likely). If you are seeing PFS page waits then you should increase the number of files. If you aren't seeing PFS page waits then adding tempdb files won't do anything but slow down the SQL instance restart time. Of all the clients I work with only one that has more than 8 tempdb files on an instance, and they have 110 tempdb files.

The files per core thing is a total myth at this point. The recommendation was made back in the SQL 2000 time because we only had 1 core per CPU so the math worked out easily.
Post #1551383
Posted Friday, March 14, 2014 2:56 PM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, October 17, 2014 9:18 AM
Points: 77, Visits: 217
Sorry I wasn't very clear. There are four file groups all residing on one RAID10 volume:

Primary: one file
Filegroup2: forty files
Filegroup3: forty files
Filegroup 4: one file

I was told that this was done to reduce read and write latency but i just can't find any evidence that this is correct.


That's because there isn't any benefit to doing this.
Post #1551384
Posted Monday, March 17, 2014 8:29 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 7:59 PM
Points: 1,194, Visits: 2,222
msmithson (3/14/2014)
My company recently migrated to new hardware. The decision was made to create a database file per core per filegroup so now the database is spread across > 80 files. All of these files reside on one RAID10 volume. I cannot find any evidence online to support this configuration for a user database (only tempDB and even then its 1/2 to 1/4 the number per core). Is this configuration ok or is there something we should look at specifically to see if it is causing performance issues?


Having 80 files for a DB is not a good design. It will have a negative impact on the performance and make administration complex.

--
SQLBuddy
Post #1551763
Posted Monday, March 17, 2014 8:54 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:02 PM
Points: 35,397, Visits: 31,955
I guess I'll be alone in this. I don't believe it's necessarily a bad design at all.

First, having the 80 files won't degrade performance. It won't enhance it, but it won't degrade it.

As for maintenance and administration, it won't cause any heartache if you've automated things like backups. It fact, it could reduce backup times if your automation checks to see if there have been inserts, updates, or deletes and backing up only those files that have actually experienced a change.

It will also make dropping a customer easier in the future if the system was setup to tolerate just dropping a file.

Last but not least, if will also allow for "piecemeal" restores if that was a consideration in the grand design of things.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1551782
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse