all groups > sql server replication > january 2005 >
You're in the

sql server replication

group:

Search Performance


Search Performance Shabam
1/30/2005 6:46:51 AM
sql server replication: I have a web application coded in dotnet and ms sql server. It is a
multiuser system that lets members search for other members via their
profile fields. It gets complicated in that it lets users search based on
distance from a zip code, as well as degree of separation.

However every time I perform a search I see a spike in the cpu to about 50%
(briefly) and there isn't even that many users (still testing) on the
system. The way things are going I doubt it can handle more than 50
simultaneous searches, if that.

The system has 4GB of ram, is running RAID 5, running dual AMD. I suspect
the database design is probably not optimized, but I cannot tell since I
hired programmers to code it up, and I'm not exactly a database expert.

My question is, other than finding some expert to come in and help me
optimize the code, what other steps are there for me to scale out the server
so that searches can be handled when the userbase grows much larger?
Replication and having searches load balanced? What are some of the popular
and/or easier ways to do this?

Re: Search Performance Tom Moreau
1/30/2005 10:39:34 AM
As always, it depends on a number of factors. Certainly, a 50% spike is
nothing to worry about with the amount of data that you have. I'd try
generating an amount of data similar to that representative of production
and then retry your test with a load expected for production. If you are
CPU bound, then consider going to a 4 or 8 way box.

That said, there is no substitute for expertise. I'd bring in an expert for
a couple of weeks to look at your design and code, and then render an
opinion as to how to proceed.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
..
[quoted text, click to view]
I have a web application coded in dotnet and ms sql server. It is a
multiuser system that lets members search for other members via their
profile fields. It gets complicated in that it lets users search based on
distance from a zip code, as well as degree of separation.

However every time I perform a search I see a spike in the cpu to about 50%
(briefly) and there isn't even that many users (still testing) on the
system. The way things are going I doubt it can handle more than 50
simultaneous searches, if that.

The system has 4GB of ram, is running RAID 5, running dual AMD. I suspect
the database design is probably not optimized, but I cannot tell since I
hired programmers to code it up, and I'm not exactly a database expert.

My question is, other than finding some expert to come in and help me
optimize the code, what other steps are there for me to scale out the server
so that searches can be handled when the userbase grows much larger?
Replication and having searches load balanced? What are some of the popular
and/or easier ways to do this?

Re: Search Performance Steve Kass
1/30/2005 2:49:31 PM
Shabam,

If I understand the kind of functionality you are providing,
it's not a simple database search, but instead a geographical
or spatial search. SQL Server, like most database products,
is not really designed to make these kinds of searches efficient.

I don't know how you've implemented what you have now,
and it would be easier to help if you could post the query that
is causing the CPU spike, along with the CREATE statements
for the tables, indexes, functions, procedures, etc., that are used.

A few weeks ago, I posted some thoughts in response to a
related question, and maybe you'll find something useful there:

http://groups.google.co.uk/groups?threadm=uPi5fCz9EHA.3260%40TK2MSFTNGP14.phx.gbl

Steve Kass
Drew University


[quoted text, click to view]
Re: Search Performance Uri Dimant
1/30/2005 5:39:32 PM
Shabam
From your narrative I can say that if you have a spike in CPU 50% it is ok.
Do you have any indexes defined on the tables?
I think you will be starting to see the problems/IO bottlenecks if you have
a spike of >80% during 20-30 minutes.



[quoted text, click to view]

Re: Search Performance dbmonitor
2/2/2005 8:28:59 PM
When you say spike briefly, how brief is that?

One of the databases I maintain requires us to prebuild a table of
properties with distances to other properties on it. This builds a
table containing in excess of 80 million rows. The whole process takes
several hours on a box only a fraction as powerful as what you seam to
have running at 100% the whole time.

If your spike is less than a few seconds, I wouldn't worry about it.

--
David Rowland
For a good user and performance monitor, try DBMonitor
http://dbmonitor.tripod.com
AddThis Social Bookmark Button