Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



Component One


rssbus
 


Xojo

Reader rating:
Click here to read 6 comments about this article.
Article source: CoDe (SQL Server Observer)

SQL Server 2005: Scaling Up and Out


Ron Talmage

Joining the CoDe Magazine E-Column and E-Mail Newsletter this month is the SQL Server Observer edited by Ron Talmage. Ron is a CoDe Magazine author, SQL Server MVP, and current president of the Pacific Northwest SQL Server User Group. SQL Server Observer will cover technical topics that bear on directions and trends in the SQL Server community.

It’s been a big year for SQL Server 2005. The release has done well, gets lots of good press, and despite some pain points, it is definitely a marked improvement over SQL Server 2000. What I’d like to do is summarize some important positives and then focus on what is shaping up to be the most important strategic direction for the database system: scaling out.

Huzzas

There’s been a lot of interesting buzz surrounding SQL Server 2005, which you can basically summarize as What’s New? It took Microsoft much longer than usual to develop SQL Server 2005, over six years, and so most of their focus has naturally been on new features. And they are legion, especially in the BI area.

The dramatic revisions in Analysis Services, as well as Integration Services and Reporting Services, have proven to cause some pain for those wishing to upgrade. In many cases, you simply must redesign cubes, rewrite packages, and recode reports.

On the database engine side, new features such as the integrated CLR as well as Database Mirroring have tended to grab most of the attention. In fact, the plethora of new features plus the ease of upgrading the database engine has tended to lead many into thinking that there aren’t significant changes in the engine itself.

But just take a quick look at the operation of Database Mail, and the dialogs for replication and log shipping in SQL Server 2005, and you’ll soon see that Microsoft improved a lot. Features that used to be painful, such as SQL Mail, or confusing, such as replication, now just work and are almost as close to intuitive as they can get. Features that used to take much more time than seemed right, such as creating a Full-Text catalog, are now vastly improved in performance as well as operations. The list goes on and on.

The Task Ahead

Despite all these major improvements, one area that SQL Server 2005 takes some small jabs at, without hitting squarely yet, is scaling out. When many experts discuss scalability they distinguish scaling up from scaling out. Scaling up means replacing or strengthening current server hardware, whereas scaling out means adding equivalent (preferably cheap) server hardware alongside the server currently in use.

Scaling Up

SQL Server 2005 makes some interesting strides in support of scaling up. You can install it on 64-bit hardware running Windows Server 2003 x64 version. The SQL Server 2005 Standard Edition has no limitation on RAM, so the x64 version can address the entire usable RAM on a 64-bit machine. You can even create a two-node cluster using SQL Server 2005 Standard Edition, whereas the Enterprise Edition now supports as many nodes as Windows failover clustering will support, as well as hot-add memory for Windows Server 2003 under most conditions.

Scaling Up tempdb

When tempdb becomes too active on a server, generally Microsoft recommends creating as many tempdb data files as there are CPUs on the machine (counting dual-core sockets as two processors.) That will enable SQL Server to use some asynchronous I/O to tempdb, but sometimes even that is not enough.

I recently saw an ASP site that used three instances of SQL Server 2005 on an x64 box in order to create three tempdbs. The old server had several independent databases on it that they divided across the three SQL Server instances. The machine has 8GB of RAM, so they simply assigned 2GB to each instance, leaving the remaining 2GB for Windows.

But this is just a workaround because there’s really no need for the multiple instances. In my opinion, the customer only needed one SQL Server 2005 Standard Edition instance to address the 8GB of RAM. Many DBAs have asked Microsoft for the ability to enable multiple tempdb databases within a single SQL Server instance. Some competing database systems do that, so perhaps Microsoft will take SQL Server in that direction.

However, you can scale tempdb out too, in some contexts, as you’ll see in the section on scalable shared databases below.

Scaling Out

Scaling up, i.e., replacing or beefing up the current server, works well for pain points such as CPU and memory bottlenecks. However, it does not generally address issues involving I/O, either for tempdb or for database files.

In addition, scaling up is expensive. Putting twice the power into a server may cost more than twice the price. What DBAs dream about is scaling out. That is, adding additional peer servers at a low cost and spreading out the application, perhaps using load balancing, across the peer servers.

Scaling Out: Separating Reads from Writes

The classic SQL Server solution for gaining additional CPU, RAM, and I/O capability by scaling out is to separate read activity from write activity, and put as much read activity on additional servers as possible. To keep the data up to date, the technology of choice is one-way transactional replication. With separate reporting servers that subscribe to data in near real-time, you can take the query load off the main server and direct it to the (often less expensive) reporting servers. This solution works well when you can safely separate reads from writes, and you can tolerate a few seconds of latency due to transactional replication. It is now somewhat common to see some reporting servers where the application uses standard load balancing techniques to spread the query load across a set of read-only subscriber servers.

Scalable Shared Databases

After the release of SQL Server 2005, Microsoft announced a new scale-out feature in a KB article (910378, dated November 23, 2005). For a scalable shared database, you can mount a read-only copy of a database onto a SAN volume that supports shared data. Then many different SQL Server instances can access the read-only data for querying.

Scalable shared databases effectively allow you to increase the CPU, RAM, and tempdb resources available for querying data, by adding additional peer servers. Each server adds its own CPU and RAM (for data cache) to the mix, but in a horizontal fashion. In addition, each server has its own tempdb, which can be helpful if the queries make extensive use of work tables and tempdb objects.

Well, does the I/O scale out? The answer is yes, but it takes a little explanation.

From the UNIX World: Clustered File Systems

For years the UNIX world has been working on a different type of clustering than Windows, known as clustered file systems. Numerous versions are out there, but the one most known to SQL Server DBAs is PolyServe. The PolyServe Matrix Server is a service that runs on servers attached to a SAN, and makes a set of them into a cluster (or matrix.) At the same time, the Matrix Server uses a Windows NTFS-compliant file system, called PSFS (PolyServe File System) that exposes selected SAN volumes as shared to all servers in the matrix.

Why is that interesting? Because then each server has its own independent I/O path to shared data files. For a scalable shared database, each server issues queries using its own HBAs (Host Bus Adaptor-the way of connecting to a SAN when using fibre channel) directly to the data. Now you’ve suddenly scaled out your I/O.

Of course, now the problem has been pushed down to the performance of the disk subsystem itself. But that’s something to address by other means, such as tuning the SAN configuration (and buying faster hard drives!)

The main limitation with scalable shared databases is that you must take them offline in order to refresh them. The reader servers must detach the databases; you place a new copy of the OLTP database in its place, mark it as read only, and then attach the databases back to the servers. So the scalable shared database is almost always going to be out of date compared to the original OLTP database. For those who require near real time data, the transactional replication solution is more viable.

Where Next?

There’s much more to the clustered file system story and how to scale out. The ultimate goal is not to scale out just reads, but also to scale out writes. In my next installment, I’ll look more closely at where SQL Server seems to be headed in order to reach that goal.


How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
4.6 out of 5

94 people have rated this article.

rssbus

      Xojo

 

Hacker Halted