Showing posts with label affinity. Show all posts
Showing posts with label affinity. Show all posts

Sunday, February 12, 2012

affinity mask.

SQL 2K Ent SP3a WIN2k Adv SP3.
I'd like to switch off one of the physical processors on a database server,
to
give some resources back to the OS, as the server isn't totally dedicated to
SQL.
The processors are 4 xeons, which Win2k and SQL see as 8 processors. How
can I be sure that I'm stopping sql from using 1 physical processor rather
than two
logical portions.
Hopefully the above makes sense, I effectively only want sql server to use 3
of the
4 physical processors.
TIA.SQL server -> properties -> processor -> In processor control, uncheck on
one of the CPUs.
Richard
"Stressed" <k@.c.co.uk> wrote in message
news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> SQL 2K Ent SP3a WIN2k Adv SP3.
> I'd like to switch off one of the physical processors on a database
server,
> to
> give some resources back to the OS, as the server isn't totally dedicated
to
> SQL.
> The processors are 4 xeons, which Win2k and SQL see as 8 processors. How
> can I be sure that I'm stopping sql from using 1 physical processor rather
> than two
> logical portions.
> Hopefully the above makes sense, I effectively only want sql server to use
3
> of the
> 4 physical processors.
> TIA.
>|||Actually if it is seeing 8 procs due to HT you need to uncheck two of them.
The last 2 might be best.
--
Andrew J. Kelly
SQL Server MVP
"Richard Ding" <dingr@.cleanharbors.com> wrote in message
news:ebhh6JgVDHA.2164@.TK2MSFTNGP09.phx.gbl...
> SQL server -> properties -> processor -> In processor control, uncheck on
> one of the CPUs.
>
> Richard
> "Stressed" <k@.c.co.uk> wrote in message
> news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > SQL 2K Ent SP3a WIN2k Adv SP3.
> >
> > I'd like to switch off one of the physical processors on a database
> server,
> > to
> > give some resources back to the OS, as the server isn't totally
dedicated
> to
> > SQL.
> >
> > The processors are 4 xeons, which Win2k and SQL see as 8 processors. How
> > can I be sure that I'm stopping sql from using 1 physical processor
rather
> > than two
> > logical portions.
> >
> > Hopefully the above makes sense, I effectively only want sql server to
use
> 3
> > of the
> > 4 physical processors.
> >
> > TIA.
> >
> >
>|||Thanks for taking the time to reply, unfortunately, I'm trying to stop sql
from using a whole processor, not just switching off one part of a logical
one.
"Richard Ding" <dingr@.cleanharbors.com> wrote in message
news:ebhh6JgVDHA.2164@.TK2MSFTNGP09.phx.gbl...
> SQL server -> properties -> processor -> In processor control, uncheck on
> one of the CPUs.
>
> Richard
> "Stressed" <k@.c.co.uk> wrote in message
> news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > SQL 2K Ent SP3a WIN2k Adv SP3.
> >
> > I'd like to switch off one of the physical processors on a database
> server,
> > to
> > give some resources back to the OS, as the server isn't totally
dedicated
> to
> > SQL.
> >
> > The processors are 4 xeons, which Win2k and SQL see as 8 processors. How
> > can I be sure that I'm stopping sql from using 1 physical processor
rather
> > than two
> > logical portions.
> >
> > Hopefully the above makes sense, I effectively only want sql server to
use
> 3
> > of the
> > 4 physical processors.
> >
> > TIA.
> >
> >
>|||That is why I suggested unchecking two of them<g>. One for the logical and
one for the physical.
--
Andrew J. Kelly
SQL Server MVP
"Stressed" <k@.c.co.uk> wrote in message
news:uePEppgVDHA.1600@.TK2MSFTNGP09.phx.gbl...
> Thanks for taking the time to reply, unfortunately, I'm trying to stop sql
> from using a whole processor, not just switching off one part of a logical
> one.
>
>
> "Richard Ding" <dingr@.cleanharbors.com> wrote in message
> news:ebhh6JgVDHA.2164@.TK2MSFTNGP09.phx.gbl...
> > SQL server -> properties -> processor -> In processor control, uncheck
on
> > one of the CPUs.
> >
> >
> >
> > Richard
> >
> > "Stressed" <k@.c.co.uk> wrote in message
> > news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > SQL 2K Ent SP3a WIN2k Adv SP3.
> > >
> > > I'd like to switch off one of the physical processors on a database
> > server,
> > > to
> > > give some resources back to the OS, as the server isn't totally
> dedicated
> > to
> > > SQL.
> > >
> > > The processors are 4 xeons, which Win2k and SQL see as 8 processors.
How
> > > can I be sure that I'm stopping sql from using 1 physical processor
> rather
> > > than two
> > > logical portions.
> > >
> > > Hopefully the above makes sense, I effectively only want sql server to
> use
> > 3
> > > of the
> > > 4 physical processors.
> > >
> > > TIA.
> > >
> > >
> >
> >
>|||Andrew,
are the logical processors belonging to a physical processor always listed
together, i.e., 0,1 are physical processor 1; 2,3 PP 2, etc? I was thinking
it of being this way, but do not know it as a fact.
Quentin
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:eZ8ycbhVDHA.2212@.TK2MSFTNGP12.phx.gbl...
> That is why I suggested unchecking two of them<g>. One for the logical
and
> one for the physical.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "Stressed" <k@.c.co.uk> wrote in message
> news:uePEppgVDHA.1600@.TK2MSFTNGP09.phx.gbl...
> > Thanks for taking the time to reply, unfortunately, I'm trying to stop
sql
> > from using a whole processor, not just switching off one part of a
logical
> > one.
> >
> >
> >
> >
> > "Richard Ding" <dingr@.cleanharbors.com> wrote in message
> > news:ebhh6JgVDHA.2164@.TK2MSFTNGP09.phx.gbl...
> > > SQL server -> properties -> processor -> In processor control, uncheck
> on
> > > one of the CPUs.
> > >
> > >
> > >
> > > Richard
> > >
> > > "Stressed" <k@.c.co.uk> wrote in message
> > > news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > > SQL 2K Ent SP3a WIN2k Adv SP3.
> > > >
> > > > I'd like to switch off one of the physical processors on a database
> > > server,
> > > > to
> > > > give some resources back to the OS, as the server isn't totally
> > dedicated
> > > to
> > > > SQL.
> > > >
> > > > The processors are 4 xeons, which Win2k and SQL see as 8 processors.
> How
> > > > can I be sure that I'm stopping sql from using 1 physical processor
> > rather
> > > > than two
> > > > logical portions.
> > > >
> > > > Hopefully the above makes sense, I effectively only want sql server
to
> > use
> > > 3
> > > > of the
> > > > 4 physical processors.
> > > >
> > > > TIA.
> > > >
> > > >
> > >
> > >
> >
> >
>|||I have yet to see it documented myself but that is how I understand it to
be.
--
Andrew J. Kelly
SQL Server MVP
"Quentin Ran" <ab@.who.com> wrote in message
news:Oah2M1hVDHA.2268@.TK2MSFTNGP11.phx.gbl...
> Andrew,
> are the logical processors belonging to a physical processor always listed
> together, i.e., 0,1 are physical processor 1; 2,3 PP 2, etc? I was
thinking
> it of being this way, but do not know it as a fact.
> Quentin
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:eZ8ycbhVDHA.2212@.TK2MSFTNGP12.phx.gbl...
> > That is why I suggested unchecking two of them<g>. One for the logical
> and
> > one for the physical.
> >
> > --
> >
> > Andrew J. Kelly
> > SQL Server MVP
> >
> >
> > "Stressed" <k@.c.co.uk> wrote in message
> > news:uePEppgVDHA.1600@.TK2MSFTNGP09.phx.gbl...
> > > Thanks for taking the time to reply, unfortunately, I'm trying to stop
> sql
> > > from using a whole processor, not just switching off one part of a
> logical
> > > one.
> > >
> > >
> > >
> > >
> > > "Richard Ding" <dingr@.cleanharbors.com> wrote in message
> > > news:ebhh6JgVDHA.2164@.TK2MSFTNGP09.phx.gbl...
> > > > SQL server -> properties -> processor -> In processor control,
uncheck
> > on
> > > > one of the CPUs.
> > > >
> > > >
> > > >
> > > > Richard
> > > >
> > > > "Stressed" <k@.c.co.uk> wrote in message
> > > > news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > > > SQL 2K Ent SP3a WIN2k Adv SP3.
> > > > >
> > > > > I'd like to switch off one of the physical processors on a
database
> > > > server,
> > > > > to
> > > > > give some resources back to the OS, as the server isn't totally
> > > dedicated
> > > > to
> > > > > SQL.
> > > > >
> > > > > The processors are 4 xeons, which Win2k and SQL see as 8
processors.
> > How
> > > > > can I be sure that I'm stopping sql from using 1 physical
processor
> > > rather
> > > > > than two
> > > > > logical portions.
> > > > >
> > > > > Hopefully the above makes sense, I effectively only want sql
server
> to
> > > use
> > > > 3
> > > > > of the
> > > > > 4 physical processors.
> > > > >
> > > > > TIA.
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||Yes I believe 0 is the first physical processor and 1 will be the 1st
Logical processor and they go together. 2 is the second physical processor
etc.
--
Andrew J. Kelly
SQL Server MVP
"Stressed" <k@.c.co.uk> wrote in message
news:uVxhB4mVDHA.3232@.tk2msftngp13.phx.gbl...
> Thanks for all the replies.
> My question, although badly worded was the same point as made
> by Quentin, as to whether 0 & 2 constituted a physical processor
> to windows or whether 0 & 1 constituted a physical processor.
> I stumbled across a web page showing the architecture for this a
> while ago and now I need to reference it, can't find it anywhere.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:uvUaI5jVDHA.1280@.tk2msftngp13.phx.gbl...
> > I have yet to see it documented myself but that is how I understand it
to
> > be.
> >
> > --
> >
> > Andrew J. Kelly
> > SQL Server MVP
> >
> >
> > "Quentin Ran" <ab@.who.com> wrote in message
> > news:Oah2M1hVDHA.2268@.TK2MSFTNGP11.phx.gbl...
> > > Andrew,
> > >
> > > are the logical processors belonging to a physical processor always
> listed
> > > together, i.e., 0,1 are physical processor 1; 2,3 PP 2, etc? I was
> > thinking
> > > it of being this way, but do not know it as a fact.
> > >
> > > Quentin
> > >
> > >
> > > "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> > > news:eZ8ycbhVDHA.2212@.TK2MSFTNGP12.phx.gbl...
> > > > That is why I suggested unchecking two of them<g>. One for the
> logical
> > > and
> > > > one for the physical.
> > > >
> > > > --
> > > >
> > > > Andrew J. Kelly
> > > > SQL Server MVP
> > > >
> > > >
> > > > "Stressed" <k@.c.co.uk> wrote in message
> > > > news:uePEppgVDHA.1600@.TK2MSFTNGP09.phx.gbl...
> > > > > Thanks for taking the time to reply, unfortunately, I'm trying to
> stop
> > > sql
> > > > > from using a whole processor, not just switching off one part of a
> > > logical
> > > > > one.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Richard Ding" <dingr@.cleanharbors.com> wrote in message
> > > > > news:ebhh6JgVDHA.2164@.TK2MSFTNGP09.phx.gbl...
> > > > > > SQL server -> properties -> processor -> In processor control,
> > uncheck
> > > > on
> > > > > > one of the CPUs.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Richard
> > > > > >
> > > > > > "Stressed" <k@.c.co.uk> wrote in message
> > > > > > news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > > > > > SQL 2K Ent SP3a WIN2k Adv SP3.
> > > > > > >
> > > > > > > I'd like to switch off one of the physical processors on a
> > database
> > > > > > server,
> > > > > > > to
> > > > > > > give some resources back to the OS, as the server isn't
totally
> > > > > dedicated
> > > > > > to
> > > > > > > SQL.
> > > > > > >
> > > > > > > The processors are 4 xeons, which Win2k and SQL see as 8
> > processors.
> > > > How
> > > > > > > can I be sure that I'm stopping sql from using 1 physical
> > processor
> > > > > rather
> > > > > > > than two
> > > > > > > logical portions.
> > > > > > >
> > > > > > > Hopefully the above makes sense, I effectively only want sql
> > server
> > > to
> > > > > use
> > > > > > 3
> > > > > > > of the
> > > > > > > 4 physical processors.
> > > > > > >
> > > > > > > TIA.
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||Our sysadmin told me that it is in the BIOS.
"Stressed" <k@.c.co.uk> wrote in message
news:uVxhB4mVDHA.3232@.tk2msftngp13.phx.gbl...
> Thanks for all the replies.
> My question, although badly worded was the same point as made
> by Quentin, as to whether 0 & 2 constituted a physical processor
> to windows or whether 0 & 1 constituted a physical processor.
> I stumbled across a web page showing the architecture for this a
> while ago and now I need to reference it, can't find it anywhere.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:uvUaI5jVDHA.1280@.tk2msftngp13.phx.gbl...
> > I have yet to see it documented myself but that is how I understand it
to
> > be.
> >
> > --
> >
> > Andrew J. Kelly
> > SQL Server MVP
> >
> >
> > "Quentin Ran" <ab@.who.com> wrote in message
> > news:Oah2M1hVDHA.2268@.TK2MSFTNGP11.phx.gbl...
> > > Andrew,
> > >
> > > are the logical processors belonging to a physical processor always
> listed
> > > together, i.e., 0,1 are physical processor 1; 2,3 PP 2, etc? I was
> > thinking
> > > it of being this way, but do not know it as a fact.
> > >
> > > Quentin
> > >
> > >
> > > "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> > > news:eZ8ycbhVDHA.2212@.TK2MSFTNGP12.phx.gbl...
> > > > That is why I suggested unchecking two of them<g>. One for the
> logical
> > > and
> > > > one for the physical.
> > > >
> > > > --
> > > >
> > > > Andrew J. Kelly
> > > > SQL Server MVP
> > > >
> > > >
> > > > "Stressed" <k@.c.co.uk> wrote in message
> > > > news:uePEppgVDHA.1600@.TK2MSFTNGP09.phx.gbl...
> > > > > Thanks for taking the time to reply, unfortunately, I'm trying to
> stop
> > > sql
> > > > > from using a whole processor, not just switching off one part of a
> > > logical
> > > > > one.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Richard Ding" <dingr@.cleanharbors.com> wrote in message
> > > > > news:ebhh6JgVDHA.2164@.TK2MSFTNGP09.phx.gbl...
> > > > > > SQL server -> properties -> processor -> In processor control,
> > uncheck
> > > > on
> > > > > > one of the CPUs.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Richard
> > > > > >
> > > > > > "Stressed" <k@.c.co.uk> wrote in message
> > > > > > news:e1aWPEgVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > > > > > SQL 2K Ent SP3a WIN2k Adv SP3.
> > > > > > >
> > > > > > > I'd like to switch off one of the physical processors on a
> > database
> > > > > > server,
> > > > > > > to
> > > > > > > give some resources back to the OS, as the server isn't
totally
> > > > > dedicated
> > > > > > to
> > > > > > > SQL.
> > > > > > >
> > > > > > > The processors are 4 xeons, which Win2k and SQL see as 8
> > processors.
> > > > How
> > > > > > > can I be sure that I'm stopping sql from using 1 physical
> > processor
> > > > > rather
> > > > > > > than two
> > > > > > > logical portions.
> > > > > > >
> > > > > > > Hopefully the above makes sense, I effectively only want sql
> > server
> > > to
> > > > > use
> > > > > > 3
> > > > > > > of the
> > > > > > > 4 physical processors.
> > > > > > >
> > > > > > > TIA.
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Affinity mask setting in Yukon.

Hello,
Current setup: 3 instances of SQL server 2005 on a 2 CPU box.
How do I use IO/affinity to ensure that all SQL Server related I/O goes to
the first CPU? I'm aware that sp_configure is the command to be used.
But how do I exactly specify that the first CPU is to be exclusively used
for SQLServer I/O? Can someone give me an example OR point me to an page tha
t
has more info on this?
Cheers!
SQLCatzThe easiest way is to set the masks graphically in SSMS (Server Properties,
Processors).
There are more technical details about the whole process at
http://msdn2.microsoft.com/en-us/library/ms187104.aspx
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||Hello Paul,
Unfortunately I cannot use the GUI for this.
It has to be part of a script.
Which means that I have to use sp_configure.
But how do I specify which CPU gets the SQL Server related I/O?
Cheers!
SQLCatz|||For the first proc only, it'll be
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'affinity mask', 1;
RECONFIGURE;
GO
For the second proc only, it'll be
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'affinity mask', 2;
RECONFIGURE;
GO
For the both procs, it'll be
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'affinity mask', 3;
RECONFIGURE;
GO
Similarly for the affinity I/O mask.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||Hello Paul,
Thank you for that!
Recall reading on a web site that the setting was to be done using a bitmap
mask, where each bit specified the CPU number. Is this correct? And if it is
- how do I go about using this option? Just curious.
Cheers!
SQLCatz|||Please have a look at the link in my first post - htere's a good explanation
of the conversion needed for bitmasks and decimal values. The only tricky
thing to remember is that the processors are zero-indexed ie the first
processor is number 0 and the second is number 1 etc.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Affinity mask setting in Yukon.

Hello,
Current setup: 3 instances of SQL server 2005 on a 2 CPU box.
How do I use IO/affinity to ensure that all SQL Server related I/O goes to
the first CPU? I'm aware that sp_configure is the command to be used.
But how do I exactly specify that the first CPU is to be exclusively used
for SQLServer I/O? Can someone give me an example OR point me to an page that
has more info on this?
Cheers!
SQLCatzThe easiest way is to set the masks graphically in SSMS (Server Properties,
Processors).
There are more technical details about the whole process at
http://msdn2.microsoft.com/en-us/library/ms187104.aspx
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||Hello Paul,
Unfortunately I cannot use the GUI for this.
It has to be part of a script.
Which means that I have to use sp_configure.
But how do I specify which CPU gets the SQL Server related I/O?
Cheers!
SQLCatz|||For the first proc only, it'll be
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'affinity mask', 1;
RECONFIGURE;
GO
For the second proc only, it'll be
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'affinity mask', 2;
RECONFIGURE;
GO
For the both procs, it'll be
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'affinity mask', 3;
RECONFIGURE;
GO
Similarly for the affinity I/O mask.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||Hello Paul,
Thank you for that!
Recall reading on a web site that the setting was to be done using a bitmap
mask, where each bit specified the CPU number. Is this correct? And if it is
- how do I go about using this option? Just curious.
Cheers!
SQLCatz|||Please have a look at the link in my first post - htere's a good explanation
of the conversion needed for bitmasks and decimal values. The only tricky
thing to remember is that the processors are zero-indexed ie the first
processor is number 0 and the second is number 1 etc.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

affinity mask question

Hello:
I took the MCDBA exam last week. I almost got over the hump, but one
question on the test (related to the Subject left completely
stumped. If you can provide any help, I would be most appreciative.
The gist of the question is:
You manage a server with 4-processors and 1GB of RAM. There are
performance problems, so you get some perfmon statistics. The values
you get are 90% Processor Time, 95% User time and 20% Privilege
Time. How should you approach this problem:
A. go to 2GB RAM
B. go to 4GB RAM
C. change the affinity mask to only use processors 0,1,2
C. change the affinity mask to only use processors 1,2,3
The only part of this problem (I think) I understand would be: if
the Privilege time is high, then the system is spending too much
time doing "cluster" work rather than "user" (i.e. SQLS2k) work.
But that is not the case in this problem.
Rather than just the correct answer, I need to know how to approach
a problem like this. So, any BOL aricles or links about this would
be most helpful.
TIA.
Regards..
I'm not a DBA, however I am a SysAdmin /Lead Tech for a datacenter and part
of my routine is dealing with DBs that arent running as well as they should
be.
The question seems perfectly useless to me in typical MS test style. There
is not enough information to even begin to look at solving the problem. I
have never had cause to set affinity other than testing. Sounds like a bad
work around to me.
My real world approach would be
1.) Ram is cheep and 1gig of ram is weak in any DB. SQL std uses 2gig, so as
a minimum I would start with 3gigs regardless of performance. If I knew it
was SQL Ent I would use 4gig + depending on the version of os.
2.) A modern system tends to bottleneck on disk before cpu. I would run
perfmon on cpu, disk, memory in use, pagefile, and connections for starters.
There are several ways to address disk performance if that is actually the
problem.
3.) Most of the time a box is at or near 100% cpu its loopy code or a
runaway process. Rarely does a well maintained system hit 100% cpu for any
length of time unless there is something known to be cpu intensive being
run, and that should always be done during low use time.
4.) Throwing more hardware at a problem is usually everyones first choice,
and rarely solves the performance issue.
5.) In my opinion the best way to add more hardware is to add a whole new
system and move some of the databases to that system as most DB servers I
see are made of multiple smaller databases.
6.) Bug the DBA/developer until he fixes his broken code.
7.) Bug the DBA/developer until he fixes his broken code.
8.) Bug the DBA/developer until he fixes his broken code.
9.) Bug the DBA/developer until he fixes his broken code.
10.) Bug the DBA/developer until he fixes his broken code.
YMMV,
thanks,
DaveV
"Relishguy" <dbsearch04@.yahoo.com> wrote in message
news:84e6fe3d.0406261305.6b371af4@.posting.google.c om...
> Hello:
> I took the MCDBA exam last week. I almost got over the hump, but one
> question on the test (related to the Subject left completely
> stumped. If you can provide any help, I would be most appreciative.
> The gist of the question is:
> You manage a server with 4-processors and 1GB of RAM. There are
> performance problems, so you get some perfmon statistics. The values
> you get are 90% Processor Time, 95% User time and 20% Privilege
> Time. How should you approach this problem:
> A. go to 2GB RAM
> B. go to 4GB RAM
> C. change the affinity mask to only use processors 0,1,2
> C. change the affinity mask to only use processors 1,2,3
> The only part of this problem (I think) I understand would be: if
> the Privilege time is high, then the system is spending too much
> time doing "cluster" work rather than "user" (i.e. SQLS2k) work.
> But that is not the case in this problem.
> Rather than just the correct answer, I need to know how to approach
> a problem like this. So, any BOL aricles or links about this would
> be most helpful.
> TIA.
> Regards..
|||I'm not a DBA, however I am a SysAdmin /Lead Tech for a datacenter and part
of my routine is dealing with DBs that arent running as well as they should
be.
The question seems perfectly useless to me in typical MS test style. There
is not enough information to even begin to look at solving the problem. I
have never had cause to set affinity other than testing. Sounds like a bad
work around to me.
My real world approach would be
1.) Ram is cheep and 1gig of ram is weak in any DB. SQL std uses 2gig, so as
a minimum I would start with 3gigs regardless of performance. If I knew it
was SQL Ent I would use 4gig + depending on the version of os.
2.) A modern system tends to bottleneck on disk before cpu. I would run
perfmon on cpu, disk, memory in use, pagefile, and connections for starters.
There are several ways to address disk performance if that is actually the
problem.
3.) Most of the time a box is at or near 100% cpu its loopy code or a
runaway process. Rarely does a well maintained system hit 100% cpu for any
length of time unless there is something known to be cpu intensive being
run, and that should always be done during low use time.
4.) Throwing more hardware at a problem is usually everyones first choice,
and rarely solves the performance issue.
5.) In my opinion the best way to add more hardware is to add a whole new
system and move some of the databases to that system as most DB servers I
see are made of multiple smaller databases.
6.) Bug the DBA/developer until he fixes his broken code.
7.) Bug the DBA/developer until he fixes his broken code.
8.) Bug the DBA/developer until he fixes his broken code.
9.) Bug the DBA/developer until he fixes his broken code.
10.) Bug the DBA/developer until he fixes his broken code.
YMMV,
thanks,
DaveV
"Relishguy" <dbsearch04@.yahoo.com> wrote in message
news:84e6fe3d.0406261305.6b371af4@.posting.google.c om...
> Hello:
> I took the MCDBA exam last week. I almost got over the hump, but one
> question on the test (related to the Subject left completely
> stumped. If you can provide any help, I would be most appreciative.
> The gist of the question is:
> You manage a server with 4-processors and 1GB of RAM. There are
> performance problems, so you get some perfmon statistics. The values
> you get are 90% Processor Time, 95% User time and 20% Privilege
> Time. How should you approach this problem:
> A. go to 2GB RAM
> B. go to 4GB RAM
> C. change the affinity mask to only use processors 0,1,2
> C. change the affinity mask to only use processors 1,2,3
> The only part of this problem (I think) I understand would be: if
> the Privilege time is high, then the system is spending too much
> time doing "cluster" work rather than "user" (i.e. SQLS2k) work.
> But that is not the case in this problem.
> Rather than just the correct answer, I need to know how to approach
> a problem like this. So, any BOL aricles or links about this would
> be most helpful.
> TIA.
> Regards..

affinity mask - license

In per processor license for Enterprise version of SQL Server 2000, can we
change the affinity mask variable to change the CPU usage and hence restrict
the number of sql server per processor licenses?
Example: In a 4 CPU server, single OS, if I change the sql server affinity
so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
then I would pay only for 2 per processor licenses for SQL Server 2000?
No. You need # of processors corresponding to the numbers that the host OS can see and uses. Here's
a quote from http://www.microsoft.com/sql/howtobuy/faq.mspx
A Processor license gives you the right to install any number of copies of SQL Server 2000 on a
single computer, as long as you have purchased Processor licenses for all of the processors on that
computer. If you have made a processor inaccessible to all operating system copies on which the SQL
Server software is set up to run, you do not need a software license for that processor.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:627E25D7-42D2-4BBE-9991-C204FA1FD206@.microsoft.com...
> In per processor license for Enterprise version of SQL Server 2000, can we
> change the affinity mask variable to change the CPU usage and hence restrict
> the number of sql server per processor licenses?
> Example: In a 4 CPU server, single OS, if I change the sql server affinity
> so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
> then I would pay only for 2 per processor licenses for SQL Server 2000?
>
>
|||I read the Licensing FAQs.. However everywhere it says:
"If you have made a processor inaccessible to all operating system copies on
which the SQL Server software is set up to run, you do not need a software
license for that processor."
Why would you make a processor inaccessible to OS? Do you mean when you have
2 or more OS installed on the same server?
Can you give an illustration of this scenario for clarification, the FAQ and
licesing link does not say much?
Thanks
"Tibor Karaszi" wrote:

> No. You need # of processors corresponding to the numbers that the host OS can see and uses. Here's
> a quote from http://www.microsoft.com/sql/howtobuy/faq.mspx
> A Processor license gives you the right to install any number of copies of SQL Server 2000 on a
> single computer, as long as you have purchased Processor licenses for all of the processors on that
> computer. If you have made a processor inaccessible to all operating system copies on which the SQL
> Server software is set up to run, you do not need a software license for that processor.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Pari" <Pari@.discussions.microsoft.com> wrote in message
> news:627E25D7-42D2-4BBE-9991-C204FA1FD206@.microsoft.com...
>
|||You might want5 to approach an MS sales rep on this. As I understand it, the reasoning why just
cutting down affinity mask doesn't cut it is that everything SQL Server does it does through the
OS...
The licensing terms used to say "numbers of physical processors in the box" (or something to that
effect), but as big boxes came out where you started partitioning the OS, it made more sense to have
it "number of processors that the OS can use", methinks...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:D38F26A9-3F72-4720-B48C-CF581801526D@.microsoft.com...[vbcol=seagreen]
>I read the Licensing FAQs.. However everywhere it says:
> "If you have made a processor inaccessible to all operating system copies on
> which the SQL Server software is set up to run, you do not need a software
> license for that processor."
> Why would you make a processor inaccessible to OS? Do you mean when you have
> 2 or more OS installed on the same server?
> Can you give an illustration of this scenario for clarification, the FAQ and
> licesing link does not say much?
> Thanks
> "Tibor Karaszi" wrote:

affinity mask - license

In per processor license for Enterprise version of SQL Server 2000, can we
change the affinity mask variable to change the CPU usage and hence restric
t
the number of sql server per processor licenses?
Example: In a 4 CPU server, single OS, if I change the sql server affinity
so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
then I would pay only for 2 per processor licenses for SQL Server 2000?No. You need # of processors corresponding to the numbers that the host OS c
an see and uses. Here's
a quote from http://www.microsoft.com/sql/howtobuy/faq.mspx
A Processor license gives you the right to install any number of copies of S
QL Server 2000 on a
single computer, as long as you have purchased Processor licenses for all of
the processors on that
computer. If you have made a processor inaccessible to all operating system
copies on which the SQL
Server software is set up to run, you do not need a software license for tha
t processor.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:627E25D7-42D2-4BBE-9991-C204FA1FD206@.microsoft.com...
> In per processor license for Enterprise version of SQL Server 2000, can we
> change the affinity mask variable to change the CPU usage and hence restr
ict
> the number of sql server per processor licenses?
> Example: In a 4 CPU server, single OS, if I change the sql server affinity
> so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
> then I would pay only for 2 per processor licenses for SQL Server 2000?
>
>|||I read the Licensing FAQs.. However everywhere it says:
"If you have made a processor inaccessible to all operating system copies on
which the SQL Server software is set up to run, you do not need a software
license for that processor."
Why would you make a processor inaccessible to OS? Do you mean when you have
2 or more OS installed on the same server?
Can you give an illustration of this scenario for clarification, the FAQ and
licesing link does not say much?
Thanks
"Tibor Karaszi" wrote:

> No. You need # of processors corresponding to the numbers that the host OS
can see and uses. Here's
> a quote from http://www.microsoft.com/sql/howtobuy/faq.mspx
> A Processor license gives you the right to install any number of copies of
SQL Server 2000 on a
> single computer, as long as you have purchased Processor licenses for all
of the processors on that
> computer. If you have made a processor inaccessible to all operating syste
m copies on which the SQL
> Server software is set up to run, you do not need a software license for t
hat processor.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Pari" <Pari@.discussions.microsoft.com> wrote in message
> news:627E25D7-42D2-4BBE-9991-C204FA1FD206@.microsoft.com...
>|||You might want5 to approach an MS sales rep on this. As I understand it, the
reasoning why just
cutting down affinity mask doesn't cut it is that everything SQL Server does
it does through the
OS...
The licensing terms used to say "numbers of physical processors in the box"
(or something to that
effect), but as big boxes came out where you started partitioning the OS, it
made more sense to have
it "number of processors that the OS can use", methinks...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:D38F26A9-3F72-4720-B48C-CF581801526D@.microsoft.com...[vbcol=seagreen]
>I read the Licensing FAQs.. However everywhere it says:
> "If you have made a processor inaccessible to all operating system copies
on
> which the SQL Server software is set up to run, you do not need a software
> license for that processor."
> Why would you make a processor inaccessible to OS? Do you mean when you ha
ve
> 2 or more OS installed on the same server?
> Can you give an illustration of this scenario for clarification, the FAQ a
nd
> licesing link does not say much?
> Thanks
> "Tibor Karaszi" wrote:
>

affinity mask - license

In per processor license for Enterprise version of SQL Server 2000, can we
change the affinity mask variable to change the CPU usage and hence restrict
the number of sql server per processor licenses?
Example: In a 4 CPU server, single OS, if I change the sql server affinity
so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
then I would pay only for 2 per processor licenses for SQL Server 2000?No. You need # of processors corresponding to the numbers that the host OS can see and uses. Here's
a quote from http://www.microsoft.com/sql/howtobuy/faq.mspx
A Processor license gives you the right to install any number of copies of SQL Server 2000 on a
single computer, as long as you have purchased Processor licenses for all of the processors on that
computer. If you have made a processor inaccessible to all operating system copies on which the SQL
Server software is set up to run, you do not need a software license for that processor.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:627E25D7-42D2-4BBE-9991-C204FA1FD206@.microsoft.com...
> In per processor license for Enterprise version of SQL Server 2000, can we
> change the affinity mask variable to change the CPU usage and hence restrict
> the number of sql server per processor licenses?
> Example: In a 4 CPU server, single OS, if I change the sql server affinity
> so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
> then I would pay only for 2 per processor licenses for SQL Server 2000?
>
>|||I read the Licensing FAQs.. However everywhere it says:
"If you have made a processor inaccessible to all operating system copies on
which the SQL Server software is set up to run, you do not need a software
license for that processor."
Why would you make a processor inaccessible to OS? Do you mean when you have
2 or more OS installed on the same server?
Can you give an illustration of this scenario for clarification, the FAQ and
licesing link does not say much?
Thanks
"Tibor Karaszi" wrote:
> No. You need # of processors corresponding to the numbers that the host OS can see and uses. Here's
> a quote from http://www.microsoft.com/sql/howtobuy/faq.mspx
> A Processor license gives you the right to install any number of copies of SQL Server 2000 on a
> single computer, as long as you have purchased Processor licenses for all of the processors on that
> computer. If you have made a processor inaccessible to all operating system copies on which the SQL
> Server software is set up to run, you do not need a software license for that processor.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Pari" <Pari@.discussions.microsoft.com> wrote in message
> news:627E25D7-42D2-4BBE-9991-C204FA1FD206@.microsoft.com...
> > In per processor license for Enterprise version of SQL Server 2000, can we
> > change the affinity mask variable to change the CPU usage and hence restrict
> > the number of sql server per processor licenses?
> >
> > Example: In a 4 CPU server, single OS, if I change the sql server affinity
> > so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
> > then I would pay only for 2 per processor licenses for SQL Server 2000?
> >
> >
> >
>|||You might want5 to approach an MS sales rep on this. As I understand it, the reasoning why just
cutting down affinity mask doesn't cut it is that everything SQL Server does it does through the
OS...
The licensing terms used to say "numbers of physical processors in the box" (or something to that
effect), but as big boxes came out where you started partitioning the OS, it made more sense to have
it "number of processors that the OS can use", methinks...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:D38F26A9-3F72-4720-B48C-CF581801526D@.microsoft.com...
>I read the Licensing FAQs.. However everywhere it says:
> "If you have made a processor inaccessible to all operating system copies on
> which the SQL Server software is set up to run, you do not need a software
> license for that processor."
> Why would you make a processor inaccessible to OS? Do you mean when you have
> 2 or more OS installed on the same server?
> Can you give an illustration of this scenario for clarification, the FAQ and
> licesing link does not say much?
> Thanks
> "Tibor Karaszi" wrote:
>> No. You need # of processors corresponding to the numbers that the host OS can see and uses.
>> Here's
>> a quote from http://www.microsoft.com/sql/howtobuy/faq.mspx
>> A Processor license gives you the right to install any number of copies of SQL Server 2000 on a
>> single computer, as long as you have purchased Processor licenses for all of the processors on
>> that
>> computer. If you have made a processor inaccessible to all operating system copies on which the
>> SQL
>> Server software is set up to run, you do not need a software license for that processor.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Pari" <Pari@.discussions.microsoft.com> wrote in message
>> news:627E25D7-42D2-4BBE-9991-C204FA1FD206@.microsoft.com...
>> > In per processor license for Enterprise version of SQL Server 2000, can we
>> > change the affinity mask variable to change the CPU usage and hence restrict
>> > the number of sql server per processor licenses?
>> >
>> > Example: In a 4 CPU server, single OS, if I change the sql server affinity
>> > so that it only uses CPU1 and CPU2, and does not use the 3 & 4 processors,
>> > then I would pay only for 2 per processor licenses for SQL Server 2000?
>> >
>> >
>> >
>>

affinity mask

Hi,
We want to test the setting of affinity mask on out
queries. we have 2 xeon processor machine so it looks like
4 processors....i want to use both the physical
processors and not the logical processor so we are setting
the value of affinity mask to 3. But how can we make sure
that it is using 2 physical processor and not 2 logical
processors of same physical processor...where can we see
this in windows task manager or performance monitor(i
didn't find any option that differentiate between logical
and physical processors)
Thanks
--Harvinderi think you are probably safer disabling HT for now,
some queries may not run well when using two separate
threads on one physical processor, other may run better on
one than two.
i have seen performance problems with index rebuilds with
HT. Until there is a comprehensive analysis of what runs
well in HT and what does not, you are probably better off
not using this feature
>--Original Message--
>Hi,
>We want to test the setting of affinity mask on out
>queries. we have 2 xeon processor machine so it looks
like
>4 processors....i want to use both the physical
>processors and not the logical processor so we are
setting
>the value of affinity mask to 3. But how can we make sure
>that it is using 2 physical processor and not 2 logical
>processors of same physical processor...where can we see
>this in windows task manager or performance monitor(i
>didn't find any option that differentiate between logical
>and physical processors)
>Thanks
>--Harvinder
>.
>|||Assuming the BIOS is written to Intels specifications, it will number the
processors starting with the first logical processor on each physical
processor, so in your case 0,1
Have a look at
http://www.microsoft.com/windows2000/docs/hyperthreading.doc
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"harvinder" <hs@.metratech.com> wrote in message
news:0bd201c3633b$8a754f70$a501280a@.phx.gbl...
Hi,
We want to test the setting of affinity mask on out
queries. we have 2 xeon processor machine so it looks like
4 processors....i want to use both the physical
processors and not the logical processor so we are setting
the value of affinity mask to 3. But how can we make sure
that it is using 2 physical processor and not 2 logical
processors of same physical processor...where can we see
this in windows task manager or performance monitor(i
didn't find any option that differentiate between logical
and physical processors)
Thanks
--Harvinder|||Thanks Jasper..Did the value of 3 looks good to u for
using only both physical processors that are logical 0,1
Thanks
--Harvinder
>--Original Message--
>Assuming the BIOS is written to Intels specifications, it
will number the
>processors starting with the first logical processor on
each physical
>processor, so in your case 0,1
>Have a look at
>http://www.microsoft.com/windows2000/docs/hyperthreading.d
oc
>--
>HTH
>Jasper Smith (SQL Server MVP)
>I support PASS - the definitive, global
>community for SQL Server professionals -
>http://www.sqlpass.org
>"harvinder" <hs@.metratech.com> wrote in message
>news:0bd201c3633b$8a754f70$a501280a@.phx.gbl...
>Hi,
>We want to test the setting of affinity mask on out
>queries. we have 2 xeon processor machine so it looks like
>4 processors....i want to use both the physical
>processors and not the logical processor so we are setting
>the value of affinity mask to 3. But how can we make sure
>that it is using 2 physical processor and not 2 logical
>processors of same physical processor...where can we see
>this in windows task manager or performance monitor(i
>didn't find any option that differentiate between logical
>and physical processors)
>Thanks
>--Harvinder
>
>.
>|||Yeah that's right
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"harvinder" <hs@.metratech.com> wrote in message
news:011801c3635e$7183bb00$a601280a@.phx.gbl...
Thanks Jasper..Did the value of 3 looks good to u for
using only both physical processors that are logical 0,1
Thanks
--Harvinder
>--Original Message--
>Assuming the BIOS is written to Intels specifications, it
will number the
>processors starting with the first logical processor on
each physical
>processor, so in your case 0,1
>Have a look at
>http://www.microsoft.com/windows2000/docs/hyperthreading.d
oc
>--
>HTH
>Jasper Smith (SQL Server MVP)
>I support PASS - the definitive, global
>community for SQL Server professionals -
>http://www.sqlpass.org
>"harvinder" <hs@.metratech.com> wrote in message
>news:0bd201c3633b$8a754f70$a501280a@.phx.gbl...
>Hi,
>We want to test the setting of affinity mask on out
>queries. we have 2 xeon processor machine so it looks like
>4 processors....i want to use both the physical
>processors and not the logical processor so we are setting
>the value of affinity mask to 3. But how can we make sure
>that it is using 2 physical processor and not 2 logical
>processors of same physical processor...where can we see
>this in windows task manager or performance monitor(i
>didn't find any option that differentiate between logical
>and physical processors)
>Thanks
>--Harvinder
>
>.
>