all groups > sql server data warehouse > september 2003 >
You're in the

sql server data warehouse

group:

optimizer & load


optimizer & load Kevin
9/26/2003 1:37:23 PM
sql server data warehouse:
So, we know that the optimizer may choose certain join types under different
memory loads or pressures, but will the optimizer vary the degree of
paralellism based on the number of already active threads or the system cpu
load?

--
Kevin Connell, MCDBA
--------------------------------------------------
The views expressed here are my own
and not of my employer.
----------------------------------------------------

Re: optimizer & load Wayne Snyder
9/28/2003 9:11:43 AM
Not at run time... At most the optimizer will output 2 plans, one serial and
one parallell... If for any reason there are not enough resources at run
time to do the parallel plan, the serial plan is run... SQL does not
currently back off of the number of processors, etc...

--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)

I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org


[quoted text, click to view]

Re: optimizer & load Anthony Zessin
9/29/2003 3:20:38 PM
No, is based only upon cost of the query, not current activity not current
load.

[quoted text, click to view]

Re: optimizer & load Dan Guzman
9/29/2003 8:55:46 PM

[quoted text, click to view]

From the SQL Server 2000 Books Online:

<Excerpt href="architec.chm::/8_ar_sa_163x.htm">

SQL Server monitors CPU usage and adjusts the degree of parallelism at
the query startup time. Lower degrees of parallelism are chosen if CPU
usage is high.

</Excerpt>

--
Hope this helps.

Dan Guzman
SQL Server MVP

-----------------------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------

[quoted text, click to view]

Re: optimizer & load Kevin
9/30/2003 9:06:58 AM
That's what I was looking for. Maybe I'll send a request for a "knob" on
this one to sqlwish :)


--
Kevin Connell, MCDBA
--------------------------------------------------
The views expressed here are my own
and not of my employer.
----------------------------------------------------
[quoted text, click to view]

Re: optimizer & load Kevin
9/30/2003 8:54:29 PM
I'm planning on doing some testing. Should be pretty straightforward to
figure out.


[quoted text, click to view]

Re: optimizer & load Gert-Jan Strik
9/30/2003 9:20:40 PM
Dan,

That is interesting. Do you know if any number of CPU's is being
considered? Or will SQL-Server scale back to a fixed number of CPU's
(for example 2, 4, 8) or will it simply scale back to 1 (and use the
serial query plan)?

I assume the degree of parallism is determined before the query plan for
this number of CPU's is compiled (or fetched from cache).

Gert-Jan


[quoted text, click to view]
Re: optimizer & load Dan Guzman
10/1/2003 7:50:40 AM
[quoted text, click to view]

My interpretation of the following (from the same topic) is that the
number of CPUs is variable and the optimal number of threads is
reevaluated for each execution:

<Excerpt>

SQL Server reexamines the optimal number of thread decisions each time a
query execution plan is retrieved from the procedure cache. For example,
one execution of a query can result in use of a serial plan, a later
execution of the same query can result in a parallel plan using three
threads, and a third execution can result in a parallel plan using four
threads.

</Excerpt>

I haven't played around with this, though. Hopefully, Kevin will post
the results of his tests.

--
Hope this helps.

Dan Guzman
SQL Server MVP



[quoted text, click to view]

Re: optimizer & load Dan Guzman
10/1/2003 7:51:22 AM
[quoted text, click to view]

Please share your results with the group.

--
Hope this helps.

Dan Guzman
SQL Server MVP


[quoted text, click to view]

Re: optimizer & load Kevin
10/2/2003 7:12:40 PM
Either my test is no good or the documentation is incorrect. DOP is not
affected by system CPU load.

I've been running a machine at 100% CPU load for hours now and large
paralell queries continue to come in at DOP=4

Environment:
4 CPU ML-570G2 (4x2.0Ghz XEON P4)
Win2k Std Sp3
SQL 2K Enterprise Sp3+ms03-031
4GB RAM
sp_config:maxdop = 0
Measuring DOP with profiler event class "Degree of Paralellism" and
verifying execution plan is paralell via QA.

Would love to know if someone else can verify these findings.

Kevin Connell, MCDBA
--------------------------------------------------


[quoted text, click to view]

Re: optimizer & load Dan Guzman
10/3/2003 8:40:02 AM
I'll see what I can find out.

--
Hope this helps.

Dan Guzman
SQL Server MVP


[quoted text, click to view]

AddThis Social Bookmark Button