question

p_plater avatar image
p_plater asked

Hardware for SQL Server

Hello We currently have a third party accounting software that runs on SQL 2005 Server Express Edition. The system runs a bit on the slow side and around once a day will freeze for 10 - 30 seconds. If a large batch or report is run the system slows right down. Our database is 2 Gig We have 15 Users Our Expected Database Growth is arround 400b / Year We are running on Gigabite Network. We have decided to go to SQL 2008 Workgroup Edition. Now Management is wondering if they should upgrade the hardware at the sametime. Our CURRENT configuration is. Windows XP 4 Gig Ram Dual ST3250310NS 500GB Drives Raid 1 Intel E8200 2.66GHz Processor Option A Windows XP 6 Gb DDR3 1600MHz ram 5 x 7200rpm 1TB Drives Raid 10 Intel I7 960 3.2GHz Processor Option B Windows Server 2003 24 Gig Ram 2x 15K Drives Raid 1 For OS 2 x 15K Drives Raid 1 for data 2 x Intel Quad Core Xeon E5404 2.0 GHz Processor's We have been told that upgrading from our current configuration to Option A will make NO difference? Is this True? Will going to a Windows Server be a Huge advantage? A couple of Opinions would be appreciated as Management will be Happy if they can save $20,000 but not if it's what we Really need. Many Thanks
sql-server-2008-r2hardware
8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

p_plater avatar image p_plater commented ·
I was thinking of SSD drives but someone said it wasn't worth it seeing the whole database could fit into the ram. I heard somewhere that SSD's would not be reliable enough for a server situation. Over a 4 hour period the average results from the performance monitor were Transactions / Sec 5.18 Wait time /ms 58.8 Deadlocks / Sec .00018 Buffer Cache Hit ratio 99.6% System page file usage 2.4% SQL Server Processor time 17.4% Page Faults / Sec 9.46 Pool non paged bytes 58630
0 Likes 0 ·
KenJ avatar image KenJ commented ·
It looks like you had a couple deadlocks during that 4 hour period. That could account for the 10-30 second daily freeze.
0 Likes 0 ·
Tim avatar image Tim commented ·
Agreed @KenJ, I think with the minimal amount of users @p_plater could get away with a server class workstation and an x64 bit box, with a little performance tuning on the DB. Also as you pointed out there are lots of refurb servers out there that vendors still warranty.
0 Likes 0 ·
p_plater avatar image p_plater commented ·
I have just turned off the Auto shrink. I Have talked Management into changing Option A to Windows 7 64 bit. One thing to note is that with option B the Server would NOT be dedicated to SQL but would be also running the Office suite for the 15 users. Option A would be Dedicated to the SQL.
0 Likes 0 ·
ThomasRushton avatar image ThomasRushton ♦♦ commented ·
OK, now you've turned off autoshrink the next thing to do is rebuild your indexes if required. Suggest you get hold of either Ola Hallengren's script or Michelle Ufford's script and run it (out of hours)
0 Likes 0 ·
p_plater avatar image p_plater commented ·
OK, How do I get hold of either of those scripts? (I don't have Google)
0 Likes 0 ·
ThomasRushton avatar image ThomasRushton ♦♦ commented ·
Links added to my answer below.
0 Likes 0 ·
p_plater avatar image p_plater commented ·
Another Quick question(And easy for any of you). Do Multiple databases in the same SQL server slow it even if they are not being used? (Should I have the Test/Development databases on a seperate instance or even a seperate Physical server?)
0 Likes 0 ·
Tim avatar image
Tim answered
First thing I would like to ask is how is CPU and memory usage on your current environment when things are "slow" You didn't specify if the Windows XP environment is x64 or not. I would hope so otherwise you are not utilizing but 3 GB of your available RAM. What is the speed of your 500 GB drives and what is the speed of the proposed 1 TB drives. Chances are both are SATA drives at 5400 or 7200 RPM. If CPU is not your bottleneck or memory then increasing either will not do you any good. Most likely it is the speed of your disk and your memory that is your issue. The first thing that jumped into my mind when you said slowness is missing indexes. Had the database been properly tuned? Are you doing any routine maintenance such as rebuilding indexes, updating stats, etc on a regular basis? As for option A, It probably would not make a significant difference in performance. Option B would for sure with the faster disk and 24 GB of ram. The 8 cores is also a big plus.
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sp_lock avatar image sp_lock commented ·
@Trad I would also suggested a good recovery plan.. One other thing, although not major this, I just dont like XP hosting SQL for a user app. I personally would go for option B, as you will then have room to grow and add other DB's as your business grows.
0 Likes 0 ·
Tim avatar image Tim commented ·
Very valid point about the recovery plan. If this is a business critical application, what would you do if the hardware it was on crashed and burned. At my shop our really critical databases are on a cluster and at minimum everything else is mirrored or log shipped.
0 Likes 0 ·
p_plater avatar image p_plater commented ·
The Windows XP is 32bit. All the Drives are 7200 rpm. How do I get a running report of the CPU and Memory usage? As far as Recovery we have a Hourly backup to a network location and a second machine loaded with SQL. (The back up machine is not server grade but runs OK for a emergency situation) We are not expecting a dramatic increase as 1/3 the Business is spliting off in 6 months (Currently we have 20 Users)
0 Likes 0 ·
Tim avatar image Tim commented ·
This goes against many of my principles but as a solution for you I would grab a spare XP workstation, wipe it and load Windows 7 x64 and put as much ram as it would hold. Then load SQL 2005 Express and restore a copy of your database to it. While you are at it, consider upgrading to 2008 if you can. For consistency though you may want to keep the SQL version the same. You will see considerable improvement with x64 and Windows 7 has much better memory management than Windows XP and isn't a 10 year old operating system. This should be a very low cost alternative to a 20k server and if you don't get the improvement you need, then go to plan B. To get the memory and CPU information take a look at Performance Monitor.
0 Likes 0 ·
KenJ avatar image
KenJ answered
It's likely that option A actually will make a difference, not because of the hardware, but because of SQL Server Workgroup edition... the Express edition you are using can only utilize 1GB of RAM. Workgroup bumps this up to 4GB RAM, so you will be able to take advantage of caching your entire database in RAM and the OS can divide up the processor work more efficiently. It might even make a difference with your current hardware. Read up on SQL Server edition differences here - [ http://www.microsoft.com/sqlserver/2008/en/us/editions-compare.aspx][1] I must ask, why do both of your options involve out-of-date operating systems? If you're getting something new, get Windows Server 2008 or R2. If you want to stay with the shoestring budget, at least use Windows 7 over Windows XP. Either way, go 64-bit so you can use the additional RAM without additional configuration to make it work. Don't forget to check your disk partition offsets for a "free" 30% database IO boost - [ http://msdn.microsoft.com/en-us/library/dd758814.aspx][2] I can't speak to which option works best for your business, but it looks like your options run to the extremes... get a barebones workstation for under $1K, or get a decently spec'd server for $20K. This is known as the either-or fallacy, and backs you into the corner of saving lots of money for what is perceived to be a poor server, or feeling like you're blowing a wad of cash for the high-end machine when you didn't need to. Either option sets management up for buyer's remorse, when you actually want them to think you're a budget-saavy super-genius. The workstation route doesn't have to be quite so bare-bones. Spice it up just a little bit for only a few hundred dollars. With a database that's only 2GB and growing very slowly, you could easily lose those 1.5TB rotating drives and throw in some 64GB SSDs for $100 apiece. A mirror for the OS, a mirror for the data files, and a mirror for the log files. $600 (minus the price of the 1.5TB drives you no longer need) for triple SSD mirrors. Not bad. Your new shoestring computer now has major curb-appeal and is weighing in at less than $1.5K. The server route doesn't have to run $20K, either. Look at the outlet side of your hardware manufacturer. You can often pick up a scratch & dent server (or mega-workstation) with great specifications for well under $5K - I see one with 16GB RAM with multiple 15K drives, similar to the one you might be looking at for $4K on a major manufacturer's site right now. The manufacturers stand behind these with as-new warranties, and they often weren't even scratched or dented! You're still getting the nicely spec'd server, just at a fraction of the price. If you take another look at your hardware options, suddenly you've got a couple very appealing alternatives. [1]: http://www.microsoft.com/sqlserver/2008/en/us/editions-compare.aspx [2]: http://msdn.microsoft.com/en-us/library/dd758814.aspx
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Scot Hauder avatar image Scot Hauder commented ·
Thanks for specing out my new home server :) i was looking for an excuse to get some SSDs
0 Likes 0 ·
ThomasRushton avatar image
ThomasRushton answered
Just one thought, given the workloads you mention... Are your databases set to "AutoClose" and "AutoShrink"? If so, turn that option off, and try again - you might find things run better and you don't need to upgrade at all. edit - OK, as you've been running with AutoShrink, one of the next thing to do is defrag your data internally. Suggest you get hold of either [Ola Hallengren's script][1] or [Michelle Ufford's script][2] and run it (out of hours). [1]: http://ola.hallengren.com/ [2]: http://sqlfool.com/2011/06/index-defrag-script-v4-1/
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

p_plater avatar image p_plater commented ·
The Auto Shrink was turned on - I'll see what happens over the next day or two.
0 Likes 0 ·
Fatherjack avatar image
Fatherjack answered
Take a look at this book http://www.simple-talk.com/books/sql-books/sql-server-hardware/ when its published and see if any of its recommendations can be applied to your scenario.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
0 Likes 0 ·
TimothyAWiseman avatar image
TimothyAWiseman answered
There are several good answers to your direct questions, but let me just add a couple of small throughts. First, neither of your options seem to consider involving SSDs. While they may not matter much with such a small database, I would as a general rule seriously consider using SSDs when working with a database. I happened to have just finished reading this post: [ http://blog.yafla.com/If_You_Arent_Using_SSDs_For_Your_Solutions_Youre_Wasting_Time_and_Money/][1] right before coming over and seeing this question. The same author discusses SSDs more at [ http://www.yafla.com/dforbes/The_Impact_of_SSDs_on_Database_Performance_and_the_Performance_Paradox_of_Data_Explodification/][2] though that one is primarily a piece about comparing NoSQL and SQL. Next, again with such a small database (assuming you are using the server only for the database and this server will serve no other functions) it may not matter much, but as a general rule RAM is the prime hardware chokepoint for a database. When looking at hardware, I generally ensure there is enough RAM first and foremost. This of course does not mean the other considerations are moot, they can be very significant, but as a general rule RAM is the most important. [1]: http://blog.yafla.com/If_You_Arent_Using_SSDs_For_Your_Solutions_Youre_Wasting_Time_and_Money/ [2]: http://www.yafla.com/dforbes/The_Impact_of_SSDs_on_Database_Performance_and_the_Performance_Paradox_of_Data_Explodification/
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenAWatson avatar image
KenAWatson answered
Forgive me for jumping on the bandwagon late, but I must reiterate a point or two that @KenJ made. We do not yet have a full picture of his configuration. One thing I am pointing to is the location of the db files. Does he have .mdf and .ldf on different LUNs? If @KenJ 's suggestions are followed here, I agree that he could have a screamer at a fraction of the cost by assembling it this way. I have run databases with both log and data on the same LUN and it was pathetic. After separating them, performance was stellar, on the exact same hardware. Here is my offering: modest hardware ~ $1000 to $1500 USD -Win7 or Srv08, x64 on dual core or more, 4-6G of RAM. -*At least* 3 LUNs in RAID 1 or 10 for R-W performance(small SSDs are great for this) one for OS, one for data, one for log, and if you have the $ you can also make one for tempdb. -SQL-WG scales to 4gb of RAM, so make your OS page file 6GB, or move up to SQL-STD and use all you can. Now that we have it all laid out nicely on the HW, let's start looking at indexes (frag, missing, unused, etc) and other performance items. My 2¢ worth.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

p_plater avatar image
p_plater answered
Sorry but what IS a LUN?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenAWatson avatar image
KenAWatson answered
A LUN is a logical unit number of a RAID disk array. When building the array you usually have the option of 'slicing' it in various ways so as to have logical disks arranged in such a fashion as to Span physical disks, thereby maximizing how your logical disk will take advantage of the physical array. It is rather a nebular concept to be typing on a mobile keyboard, so I will refer you here: http://en.wikipedia.org/wiki/Logical_Unit_Number HTH
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.