Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Monday, March 26, 2012

performance degradation after several inserts

We have a VB6 app that uses an MSDE SP3 database. We use a process with
transactions to add data to the database. As several similar packets of data
are added we've noticed a degradation in the speed of loading the
information. We've also noticed that if at the end of the insert of several
packets of data we get a 30 second upload time per packet, then shut down
MSDE, start it up again and then insert in an almost identical packet of
data, it will run twice to 3 times faster.
We tried turning autoshrink and auclose off but that didn't seem to help.
Thanks,
Terry
hi Terry,
tgrignon wrote:
> We have a VB6 app that uses an MSDE SP3 database. We use a process
> with transactions to add data to the database. As several similar
> packets of data are added we've noticed a degradation in the speed of
> loading the information. We've also noticed that if at the end of
> the insert of several packets of data we get a 30 second upload time
> per packet, then shut down MSDE, start it up again and then insert in
> an almost identical packet of data, it will run twice to 3 times
> faster.
> We tried turning autoshrink and auclose off but that didn't seem to
> help.
it can depend on the transaction... if you load a big transaction, you will
see a degradation as the transaction size increses... you can perhaps
separate the load into separated transactions..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks for the reply Andrea!
The loads are separated into different transactions. If I use a monitor I
can see that memory use continues to grow with each load so it seems like
there is a memory leak somewhere.
We are planning to try:
DBCC FREEPROCCACHE
&
DBCC DROPCLEANBUFFERS
in between loads with our next build. Do you have any other suggestions?
multo grazie,
Terry
"Andrea Montanari" wrote:

> hi Terry,
> it can depend on the transaction... if you load a big transaction, you will
> see a degradation as the transaction size increses... you can perhaps
> separate the load into separated transactions..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
|||hi Terry,
tgrignon wrote:
> Thanks for the reply Andrea!
> The loads are separated into different transactions. If I use a
> monitor I can see that memory use continues to grow with each load so
> it seems like there is a memory leak somewhere.
not a memory leak (or at least...) ... just the standard SQL Server
behavior... plese see http://tinyurl.com/bvpg9 for some details on SQL
Server memory management...

> We are planning to try:
> DBCC FREEPROCCACHE
> &
> DBCC DROPCLEANBUFFERS
> in between loads with our next build. Do you have any other
> suggestions?
do not know I I like that
those to DBCC commands will actually clear the procedure cache... that
usually includes penalty executing statements due to recompilations of
stored procedures, plans, more I/O activity due to refetching of database
pages...
and more, a nasty security requirements for them... they require high
privileges...
http://msdn.microsoft.com/library/de..._dbcc_7q5l.asp
http://msdn.microsoft.com/library/de..._dbcc_512h.asp
that's to say sysadmins and serveradmins membership...
if I could eventually not speed up operations via separating the job into
multiple transactions, I'd think I'd stay with the time degradation...

> multo grazie,
prego, you are welcome
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||I see what you mean about the permissions... but we tried
DBCC FREEPROCCACHE
in between loads and it works perfectly... the separate transaction loads
are back down to a manageable load time. I wonder if a stored procedure is
being left "on" somewhere in the code...
Any other ideas?
Thanks,
Terry
"Andrea Montanari" wrote:

> hi Terry,
> tgrignon wrote:
> not a memory leak (or at least...) ... just the standard SQL Server
> behavior... plese see http://tinyurl.com/bvpg9 for some details on SQL
> Server memory management...
>
> do not know I I like that
> those to DBCC commands will actually clear the procedure cache... that
> usually includes penalty executing statements due to recompilations of
> stored procedures, plans, more I/O activity due to refetching of database
> pages...
> and more, a nasty security requirements for them... they require high
> privileges...
> http://msdn.microsoft.com/library/de..._dbcc_7q5l.asp
> http://msdn.microsoft.com/library/de..._dbcc_512h.asp
> that's to say sysadmins and serveradmins membership...
> if I could eventually not speed up operations via separating the job into
> multiple transactions, I'd think I'd stay with the time degradation...
> prego, you are welcome
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>
|||hi,
tgrignon wrote:
> I see what you mean about the permissions... but we tried
> DBCC FREEPROCCACHE
> in between loads and it works perfectly... the separate transaction
> loads are back down to a manageable load time. I wonder if a stored
> procedure is being left "on" somewhere in the code...
no idea... you have to control

> Any other ideas?
nope..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Wednesday, March 21, 2012

Performance- Buffer Manager:Page Lookups/Sec

We have a BI app that were testing, running many different reports. Under
some conditions the Buffer Manager:Page Lookups/Sec counter spikes very
high. I was wondering if this normal behaviour, and if not, what can be
done to ameliorate it.
Thanks in advance
Not sure if you know this or not, but the page lookups/sec counter is:
Number of requests to find a page in the buffer pool.
So depending on what you are doing this could be normal. It appears that you
are retrieving data and SQL Server first trying to find the data in the
memory.
HTH,
DeeJay Puar
MCDBA
"MAS" wrote:

> We have a BI app that were testing, running many different reports. Under
> some conditions the Buffer Manager:Page Lookups/Sec counter spikes very
> high. I was wondering if this normal behaviour, and if not, what can be
> done to ameliorate it.
> Thanks in advance
>
>

Performance- Buffer Manager:Page Lookups/Sec

We have a BI app that were testing, running many different reports. Under
some conditions the Buffer Manager:Page Lookups/Sec counter spikes very
high. I was wondering if this normal behaviour, and if not, what can be
done to ameliorate it.
Thanks in advanceNot sure if you know this or not, but the page lookups/sec counter is:
Number of requests to find a page in the buffer pool.
So depending on what you are doing this could be normal. It appears that you
are retrieving data and SQL Server first trying to find the data in the
memory.
HTH,
DeeJay Puar
MCDBA
"MAS" wrote:

> We have a BI app that were testing, running many different reports. Under
> some conditions the Buffer Manager:Page Lookups/Sec counter spikes very
> high. I was wondering if this normal behaviour, and if not, what can be
> done to ameliorate it.
> Thanks in advance
>
>

Performance- Buffer Manager:Page Lookups/Sec

We have a BI app that were testing, running many different reports. Under
some conditions the Buffer Manager:Page Lookups/Sec counter spikes very
high. I was wondering if this normal behaviour, and if not, what can be
done to ameliorate it.
Thanks in advanceNot sure if you know this or not, but the page lookups/sec counter is:
Number of requests to find a page in the buffer pool.
So depending on what you are doing this could be normal. It appears that you
are retrieving data and SQL Server first trying to find the data in the
memory.
HTH,
DeeJay Puar
MCDBA
"MAS" wrote:
> We have a BI app that were testing, running many different reports. Under
> some conditions the Buffer Manager:Page Lookups/Sec counter spikes very
> high. I was wondering if this normal behaviour, and if not, what can be
> done to ameliorate it.
> Thanks in advance
>
>sql

Monday, March 12, 2012

Performance Advice

Hi,

The app I work on has a few complex queries (selects with 5-9 tables joined, data volumes of 200,000 rows +). These typically tend to aggregate info from the tables in question. They work on large volumes of data. We also have some stored procs that works on several rows of data (again in large volumes) and perform writes else where.

Overall the tables that these two types of queries run on contain millions of rows of data, and they normally work on a subset that is also substancially large - 100, 000 rows for example.

The app I work on is some sort of a tool(decision support type) and we dont expect that these queries be used like typical transaction processing systems. They will probably only be used by a few people at a time (1-3).

I've noticed that running this feature on the dev db box (2 GHZ Desktop PC with 1 GB ram) the CPU spikes to 100% and the DB server starts refusing connections to other users. Overall untill the long running queries are completed the DB may not be used by any other user.

I've tried to run the same app on a multi proc server config box. What I find is that such queries still use one of the CPUs 100%. But connections are not refused and other users can still use the database probably because of the other procs on the box.

Although this is a somewhat odd question - what does this mean ? does it mean that the query is poorly written ? Yes it is complex and we've tried to tune it to the extent possible - indexes, join sequences, intermediate materilization etc.

is it wrong to throw hardware at such a problem ? How much more might the query be tweaked ? and what will be the threshold level after which the query may not be tweaked anymore and needs better hardware ? How does one determine this ?

What I'm hoping to get with the above questions are just pointers for me to explore further and learn how I should proceed.

Any suggestions will be great.

Thanks,

Avinash

Hello,

I am not sure whether you are using MAX DOP option in your query running in production on multiple CPU's. Please look up "Degree Of Paralellism" in BOL.

I hope this helps....

Thanks.....

|||

Do any other applications use the database(s) on this server? Are they affected by your complex queries?

If performance turns out to be a serious problem, and if you tend to frequently aggregate your data, then you could consider using Analysis Services as part of your solution.

Chris

|||

Hello Chris,

Many thanks for your response. I dont have an exact answer to your question because what we build is a product and it may very well be installed on a shared database server.

But what I have seen in general is that the complex queries eat up a 100% of just one CPU per user and the number of CPUs being used 100% goes up with additional users performing the complex query. In my scenario, we dont expect any more than 1 or 2 users running such queries. If the app is running on a quad board machine, other database users will not be absolutely stranded. That is assuming that the other database users dont have similar demands from the database.

I've seen other Transaction Processing kind of apps work allright on another database on the same database server. Each complex query chews up one processor from what I've seen.

Honestly - I'm not conversant with analysis services. I will look into it. But I was hoping to get some ideas on capacity planning and determining what may be the base hardware requirement to service our needs knowing/having some idea of the volume we work with.

Any ideas will be appreciated.

Thanks,

Avinash

|||hi,
firstly i think if you use long running transactions you should consider Windows Workflow Foundation.by coincidence i have searched about this condition. i have a database which has a table with an average of 3 million rows and a relative table which has a 1,5 million rows and lastly a relative table has a 2 million rows. so i thought about what can i do. despite i have a server which has lower system capacities than yours, my server's cpu never spikes to 100%. i think there is a problem in your sql statement. once i had 2 table with 100 000 and 250 000 rows and as yours my server crashed too, i looked at task manager and saw that this query increased memory to 7 GB! anyway i suggest you to use index tuning wizard. if you didnt index your tables correctly you should do that right now. but if you indexed your tables then you should consider partitioning on tables. as i said before i execute long queries and i get response between 0-1 second! if you clarify your queries functionality then i can help you.(e.g are they insert, update or select queries?)
|||

Hello Ibrahim,

My queries are mostly complex selects with a whole bunch where conditions. They typically aggrregate data across several thousands of rows and they need to sift through millions of rows to find the subset of data.

But also I have some inserts - but they have additional read logic which again means selects with complex conditions and aggregations.

The point that I seem to have accepted is - when you say "as i said before i execute long queries and i get response between 0-1 second! if " that cannot be an absolute statement right ? In the sense that at some point your needs will require better hardware. It cannot be that any need can be satisfied by existing hardware. What I'm trying to understand is how do you determine that for your needs, X type of hardware is non negotiable.

Thanks,

Avinash

|||In my past experience, I split a complex join statement to multiple small statement. That will reduce CPU usage. Also you can review your SQL statement to find out whether there has some logic error to reduce number of temp records generated.

Friday, March 9, 2012

Performance - tweaking possible?

Hi,
we have an app that is written in a "special" way. Not using SP's. Instead,
dynamic SQL is used.
Also, it's written in a way that in order to update single order, the app
sends 4-5 SQL's; some of them INSERTs and some SELECTs.
Now here is the problem: some of the procesess require updating hundreds of
thousands of "orders". Obviously the app will not (and IS not) going to
scale. When such processes executed, SQL Server is getting hammered. After
some time in the process - one CPU is getting to 100% utilization and stays
this way until the end; this slows down the system to the point that other,
read-only clients get "timeout expired".
Now here is the bad part - even running on top of the line quad server does
not help the problem - since one CPU gets to 100% sooner or later.
I was reading technet and they suggest that SQL Server cannot split very
small requests under such conditions. The problem that there are millions of
very small (uder 100ms) requests coming from single connection.
My question is: can I configure the server in a way that more than 1 CPU is
used?
Note: changing the code is not an option at this point.
Thanks,
Dima.First, check the server settings to ensure parallel execution is enabled
(it should be by default).
Second, start looking for another job. I'm not entirely joking, here. If it
is as bad as you describe and the management is unwilling to fix the
underlying flaws, then you are in database hell. Not a pretty place.
You said nothing about the indexing on the tables. Are there any? Any
clustered indexes? This is the one place where you can make changes that
won't likely break client side code.
Bob Castleman
DBA Poseur
"Dima Semensky" <dsemen@.newsgroup.nospam> wrote in message
news:%23YnIj09MFHA.1436@.TK2MSFTNGP10.phx.gbl...
> Hi,
> we have an app that is written in a "special" way. Not using SP's.
> Instead, dynamic SQL is used.
> Also, it's written in a way that in order to update single order, the app
> sends 4-5 SQL's; some of them INSERTs and some SELECTs.
> Now here is the problem: some of the procesess require updating hundreds
> of thousands of "orders". Obviously the app will not (and IS not) going to
> scale. When such processes executed, SQL Server is getting hammered. After
> some time in the process - one CPU is getting to 100% utilization and
> stays this way until the end; this slows down the system to the point that
> other, read-only clients get "timeout expired".
> Now here is the bad part - even running on top of the line quad server
> does not help the problem - since one CPU gets to 100% sooner or later.
> I was reading technet and they suggest that SQL Server cannot split very
> small requests under such conditions. The problem that there are millions
> of very small (uder 100ms) requests coming from single connection.
> My question is: can I configure the server in a way that more than 1 CPU
> is used?
> Note: changing the code is not an option at this point.
> Thanks,
> Dima.
>|||"Dima Semensky" <dsemen@.newsgroup.nospam> wrote in message
news:%23YnIj09MFHA.1436@.TK2MSFTNGP10.phx.gbl...
> Hi,
> we have an app that is written in a "special" way. Not using SP's.
> Instead, dynamic SQL is used.
> Also, it's written in a way that in order to update single order, the app
> sends 4-5 SQL's; some of them INSERTs and some SELECTs.
> Now here is the problem: some of the procesess require updating hundreds
> of thousands of "orders". Obviously the app will not (and IS not) going to
> scale. When such processes executed, SQL Server is getting hammered. After
> some time in the process - one CPU is getting to 100% utilization and
> stays this way until the end; this slows down the system to the point that
> other, read-only clients get "timeout expired".
> Now here is the bad part - even running on top of the line quad server
> does not help the problem - since one CPU gets to 100% sooner or later.
> I was reading technet and they suggest that SQL Server cannot split very
> small requests under such conditions. The problem that there are millions
> of very small (uder 100ms) requests coming from single connection.
> My question is: can I configure the server in a way that more than 1 CPU
> is used?
> Note: changing the code is not an option at this point.
>
Let me see if I get it:
You have one session running batch processes which are comprised of hundreds
of thousands of inexpensive queries (single-row updates, selects, etc).
When this process is running other connections experience poor performance
and even timeouts.
And you wonder if you can configure the server to utilize multiple CPU's for
the work of the batch process. If that is your question, the answer it no.
And you wouldn't want to even if you could. In such a situation you want
the batch session to consume LESS not MORE server resources, in order to not
adversely affect other users. Fundamentally there's nothing fatal about
having a long-running batch job spike one of your CPU's (unless that batch
job holds locks required by other sessions).
First, determine if the other session's timeouts are caused by CPU
contention or by lock waits. If the other sessions are waiting on locks
held by the batch process, then your situation is grim. If they are victims
of CPU contention, you might be able to reduce the CPU cost of the queries
and increase the CPU resources of the server and wiggle out of trouble.
Under your constraints, here's what you can do. Capture and analyze the
commands coming from the batch connection. Examine the query plans for each
one and try to optimize them using the index tuning wizard. But "tuning"
the database server rarely has much impact on poorly written applictations.
It's worth a try, but there are limits to what you can do. You might get
lucky and find some glaring omission in the indexing which improves the
application's performance (the worse the applictation, the poorer the
indexing, right?).
David|||Thanks David.
I have done what you suggesting and I am sure that this is CPU contention
problem.
Indexes are there and work fine in smaller batches. However, when there is
huge batch once in a while it overloads the CPU which affects whole server.
I was thinking about some setting I can set to evenly spread the load. So
instead of loading 1 CPU for 100%, I could load 4 with 20 each.
In my view, it is really a matter of configuration. If the app opened new
connection for every statement - this situation would not arise, however
there would be another performance problem - with too many opened/closed
connections per sec.
So, if I could tell SQL Server to e.g. handle each statement in different
threads, say in round robin way - this could be a way out.
Note: this is temporary solution for couple months to survive
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:eKUpMt%23MFHA.244@.tk2msftngp13.phx.gbl...
> "Dima Semensky" <dsemen@.newsgroup.nospam> wrote in message
> news:%23YnIj09MFHA.1436@.TK2MSFTNGP10.phx.gbl...
> Let me see if I get it:
> You have one session running batch processes which are comprised of
> hundreds of thousands of inexpensive queries (single-row updates, selects,
> etc). When this process is running other connections experience poor
> performance and even timeouts.
> And you wonder if you can configure the server to utilize multiple CPU's
> for the work of the batch process. If that is your question, the answer
> it no. And you wouldn't want to even if you could. In such a situation
> you want the batch session to consume LESS not MORE server resources, in
> order to not adversely affect other users. Fundamentally there's nothing
> fatal about having a long-running batch job spike one of your CPU's
> (unless that batch job holds locks required by other sessions).
> First, determine if the other session's timeouts are caused by CPU
> contention or by lock waits. If the other sessions are waiting on locks
> held by the batch process, then your situation is grim. If they are
> victims of CPU contention, you might be able to reduce the CPU cost of the
> queries and increase the CPU resources of the server and wiggle out of
> trouble.
> Under your constraints, here's what you can do. Capture and analyze the
> commands coming from the batch connection. Examine the query plans for
> each one and try to optimize them using the index tuning wizard. But
> "tuning" the database server rarely has much impact on poorly written
> applictations. It's worth a try, but there are limits to what you can do.
> You might get lucky and find some glaring omission in the indexing which
> improves the application's performance (the worse the applictation, the
> poorer the indexing, right?).
> David
>|||Thanks Bob.
The reason for not changing the app is that new solution will be replacing
this soon. However, in the meantime I'm looking into what other options I
have there.
I'm just looking for a way to configure the SQL Server to may be somehow
"spread" the load
"Bob Castleman" <nomail@.here> wrote in message
news:%23ojhJl%23MFHA.2604@.TK2MSFTNGP10.phx.gbl...
> First, check the server settings to ensure parallel execution is enabled
> (it should be by default).
> Second, start looking for another job. I'm not entirely joking, here. If
> it is as bad as you describe and the management is unwilling to fix the
> underlying flaws, then you are in database hell. Not a pretty place.
> You said nothing about the indexing on the tables. Are there any? Any
> clustered indexes? This is the one place where you can make changes that
> won't likely break client side code.
> Bob Castleman
> DBA Poseur
> "Dima Semensky" <dsemen@.newsgroup.nospam> wrote in message
> news:%23YnIj09MFHA.1436@.TK2MSFTNGP10.phx.gbl...
>|||On Mon, 28 Mar 2005 16:28:51 -0500, "Dima Semensky"
<dsemen@.newsgroup.nospam> wrote:
>this way until the end; this slows down the system to the point that other,
>read-only clients get "timeout expired".
For one thing, check your isolation levels.
Some of your read-only clients are probably blocked, if it's
acceptable to run with dirty data you can run with NOLOCK and see if
that helps.
I can't think of any server-side tweaks that can help.
J.|||"Dima Semensky" <dsemen@.newsgroup.nospam> wrote in message
news:uF$k6V$MFHA.3900@.TK2MSFTNGP10.phx.gbl...
> Thanks David.
> I have done what you suggesting and I am sure that this is CPU contention
> problem.
> Indexes are there and work fine in smaller batches. However, when there is
> huge batch once in a while it overloads the CPU which affects whole
> server.
> I was thinking about some setting I can set to evenly spread the load. So
> instead of loading 1 CPU for 100%, I could load 4 with 20 each.
>
That's not what would happen. If you parallelize the load it would spike 4
CPU's to 100% for 1/4 the time (actually more since parallel plans are less
efficient).

> In my view, it is really a matter of configuration. If the app opened new
> connection for every statement - this situation would not arise, however
> there would be another performance problem - with too many opened/closed
> connections per sec.
The app would still be issuing the statements one at at time. But I'm
. How many CPU's are in the server?

> So, if I could tell SQL Server to e.g. handle each statement in different
> threads, say in round robin way - this could be a way out.
That's not really the case. Each thread is scheduled on any available CPU.
So a single connection issuing multiple single statements might have its
work scheduled on various CPU's or might have its work scheduled on the same
CPU each time. Which one of these happens is a detail of the SQL Server
User Mode Scheduler. But the net effect is the same. The batch processing
connection will account eat 1000ms of CPU time every second. If that is
250ms on each of 4 processors or 1000ms on 1 of 4 processors, the net effect
on other connections is the same. The batch process will occupy 25% of
available CPU resources.
One thing to check, though is that the batch process isn't using any
parallel query plans. With a parallel query plan the batch process could
monopolize more that 1 CPU. There is a server-wide setting for the maximum
degree of parallelism (MAXDOP). To protect online work from being adversely
affected by large batch jobs, you might want to set MAXDOP=1.

> Note: this is temporary solution for couple months to survive
>
Been there.
David|||Sorry for the sarcasm, but I still think you're in database hell.
You didn't say anything about memory utilization. Is just the CPU getting
consumed? What about other resources?
If the read only clients are truely read only (i.e. NEVER updating), then
how about replicating to another server? Then the read only clients would
not have to contend with cpu consumption on the transactional database.
Bob Castleman
DBA Poseur
"Dima Semensky" <dsemen@.newsgroup.nospam> wrote in message
news:evWx4W$MFHA.2580@.TK2MSFTNGP09.phx.gbl...
> Thanks Bob.
> The reason for not changing the app is that new solution will be replacing
> this soon. However, in the meantime I'm looking into what other options I
> have there.
> I'm just looking for a way to configure the SQL Server to may be somehow
> "spread" the load
> "Bob Castleman" <nomail@.here> wrote in message
> news:%23ojhJl%23MFHA.2604@.TK2MSFTNGP10.phx.gbl...
>|||4 CPU's. 4GB RAM, SAN
yes, the app would issue one at a time and there is no way around it.
However, if for example the SQL Server sent each statement to different
thread - then all CPU would be working instead of single.
It's a mistery for me why SQL Server goes to 100% at some point if the app
sends the statements in sequential order. May be something related to the
way it works with threads...
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:OafLAh$MFHA.3668@.TK2MSFTNGP14.phx.gbl...
> "Dima Semensky" <dsemen@.newsgroup.nospam> wrote in message
> news:uF$k6V$MFHA.3900@.TK2MSFTNGP10.phx.gbl...
> That's not what would happen. If you parallelize the load it would spike
> 4 CPU's to 100% for 1/4 the time (actually more since parallel plans are
> less efficient).
>
> The app would still be issuing the statements one at at time. But I'm
> . How many CPU's are in the server?
>
> That's not really the case. Each thread is scheduled on any available
> CPU. So a single connection issuing multiple single statements might have
> its work scheduled on various CPU's or might have its work scheduled on
> the same CPU each time. Which one of these happens is a detail of the SQL
> Server User Mode Scheduler. But the net effect is the same. The batch
> processing connection will account eat 1000ms of CPU time every second.
> If that is 250ms on each of 4 processors or 1000ms on 1 of 4 processors,
> the net effect on other connections is the same. The batch process will
> occupy 25% of available CPU resources.
> One thing to check, though is that the batch process isn't using any
> parallel query plans. With a parallel query plan the batch process could
> monopolize more that 1 CPU. There is a server-wide setting for the
> maximum degree of parallelism (MAXDOP). To protect online work from being
> adversely affected by large batch jobs, you might want to set MAXDOP=1.
>
> Been there.
> David
>|||Thanks.
All reads are NOLOCK.
For a long time I couldn't understand why the thing times out. No or little
blocking, no deadlocks, all reads are done with NOLOCK.
Finally, I found that one of the CPU is hammered at 100% for several hours.
At this point (even this is quad server), reads start slowing down and
eventually time out.
"JRStern" <jxstern@.bogus.com> wrote in message
news:748h41l7i889u1n297o616jpagucieb4gs@.
4ax.com...
> On Mon, 28 Mar 2005 16:28:51 -0500, "Dima Semensky"
> <dsemen@.newsgroup.nospam> wrote:
> For one thing, check your isolation levels.
> Some of your read-only clients are probably blocked, if it's
> acceptable to run with dirty data you can run with NOLOCK and see if
> that helps.
> I can't think of any server-side tweaks that can help.
> J.
>