Discussion:
Multi-CPU, multi-core, multi-thread
(too old to reply)
John Flynn
2009-11-23 23:04:54 UTC
Permalink
A long time ago my servers all had one ordinary CPU, and I understood how a
single ASE engine ran on the one CPU. Then I had some servers with multiple
CPUs, and I understood how I could configure approximately one engine per
CPU. Then I had some servers with CPUs that had multiple cores, and I found
out that each core counts as one "CPU" for the purpose of allocating ASE
engines. So far so good.

Now I am building a Sun T5220 system. It runs Solaris 10, and I am on ASE
15.0.2 ESD#6. This machine apparently has 1 physical processor, and 4
cores. But each core has 8 threads. The various OS commands like psrinfo and
prtdiag and mpstat all give the same answer, that there are 32 "virtual
processors". This is a new concept to me.

So, in regards to the old ASE concept of "CPU", does this machine have 32 of
'em? I think the answer is yes. The ASE manuals are no help, because all
they talk about is "CPU", they don't even mention the word "core" let alone
"thread". (But maybe I haven't found the right manual yet.)

I realize it's a separate issue to decide the optimal number of ASE engines
to allocate. (I may be hitting y'all up on that question later.) But for
now, the question is simple: according to Sybase's definition of CPU, how
many CPUs do I have? IOW, is what Sun calls a "virtual processor" equivalent
to what Sybase calls a "CPU"?

Thanks!
- John.
Mark A. Parsons
2009-11-23 23:57:57 UTC
Permalink
Searching solved cases @ sybase.com for "cpu core threads" shows:

===================================================
Case Number: 11549996
Open Date: 2009-08-12 19:20:35.7
Version/EBF: 1503/0

Product: Adaptive Server Enterprise
OS: Solaris
Platform: Sun Solaris SPARC

Case Description

# CPUs vs # cores each vs # virtual CPUs : How do they affect the number of licenses required for ASE to use the maximum
amount of resources available on the machine?

Tip or Workaround

When checking to see if an ASE is properly licensed, SySam does not take into account the number of virtual
CPUs/processors. Virtual CPUS are software threads running on a CPU.

SySam only accounts for physical CPUs and their individual cores.

Resolution

Given 4 CPUs that are each a quad(4) core, the number of CPU licenses that would be required to make maximum use of all
the CPU resources that are available, would be 16.
===================================================


Alternatively, contact Sybase Sales ... 'course, they may not know either, or you may get conflicting answers depending
on who you speak with.
Post by John Flynn
A long time ago my servers all had one ordinary CPU, and I understood how a
single ASE engine ran on the one CPU. Then I had some servers with multiple
CPUs, and I understood how I could configure approximately one engine per
CPU. Then I had some servers with CPUs that had multiple cores, and I found
out that each core counts as one "CPU" for the purpose of allocating ASE
engines. So far so good.
Now I am building a Sun T5220 system. It runs Solaris 10, and I am on ASE
15.0.2 ESD#6. This machine apparently has 1 physical processor, and 4
cores. But each core has 8 threads. The various OS commands like psrinfo and
prtdiag and mpstat all give the same answer, that there are 32 "virtual
processors". This is a new concept to me.
So, in regards to the old ASE concept of "CPU", does this machine have 32 of
'em? I think the answer is yes. The ASE manuals are no help, because all
they talk about is "CPU", they don't even mention the word "core" let alone
"thread". (But maybe I haven't found the right manual yet.)
I realize it's a separate issue to decide the optimal number of ASE engines
to allocate. (I may be hitting y'all up on that question later.) But for
now, the question is simple: according to Sybase's definition of CPU, how
many CPUs do I have? IOW, is what Sun calls a "virtual processor" equivalent
to what Sybase calls a "CPU"?
Thanks!
- John.
John Flynn
2009-11-24 00:31:56 UTC
Permalink
Post by Mark A. Parsons
When checking to see if an ASE is properly licensed, SySam does not
take into account the number of virtual CPUs/processors. Virtual CPUS
are software threads running on a CPU.
SySam only accounts for physical CPUs and their individual cores.
Resolution
Given 4 CPUs that are each a quad(4) core, the number of CPU licenses
that would be required to make maximum use of all the CPU resources
that are available, would be 16.
===================================================
Alternatively, contact Sybase Sales ... 'course, they may not know
either, or you may get conflicting answers depending on who you speak
with.
Thanks very much for that. I may need to deal with the licensing issues
sometime.

But what I was really trying to ask about was from the technical point of
view, rather than from the sales point of view. For example, all the advice
regarding how many engines to configure (including the advice in the ASE
manuals) tends to talk about "the number of CPUs" that you have. It could be
"configure one engine per CPU" or "configure one fewer engines than the
number of CPUs", or whatever. My question is, what counts as one CPU? Seems
to me the advice can't make any sense unless everyone agrees what a "CPU"
is.

My Sun T5220 machine has one CPU, with 4 cores/CPU, and 8 threads/core. This
is 32 total "virtual processors", which is confirmed in the output of the
psrinfo, prtdiag, and mpstat commands. The man page for mpstat says it shows
one line "per processor". On my system mpstat shows 32 lines.

I guess from a sales point of view I have 4 CPUs. But what about from the
technical ASE point of view? Do I have 4 or 32 CPUs? If hypothetically
someone ordered me to configure one ASE engine per CPU, exactly how many
would I configure?

Thanks.
Mark A. Parsons
2009-11-24 01:29:04 UTC
Permalink
Well, the case I referenced says CPUs = chips x cores.

So in your case ... based solely on the comments in the case ... CPUs = 4 = 1 chip x 4 cores.

Having said that ...

I was at a client that was running Solaris 9 and 10 on their Sparc machines.

On the 8 chip dual-core machines ... Solaris 9 only counted chips and said total CPUs were 8, Solaris 10 counted the
cores and said total CPUs were 16.

On the Solaris 9 box (technically 8 CPUs), we had ASE 15 configured with 'max online engines' = 15, but SYSAM would only
check out 8 licenses, yet we were able to run with 15 engines ... go figure ...

-------------

If you're running ASE 15, and you configure 'max online engines' to something like 20 ... how many licenses does SYSAM
show being checked out ... 1? 4? 20? something else? [My guess is that this 'check out' number will give you an idea
of what your particular ASE/OS combo thinks is the number of 'technical' CPUs on your machine.]

-------------

Unless someone from Sybase Engineering jumps on this thread with a definitive answer, I'd suggest you open a case with
Sybase TechSupport.
Post by John Flynn
Post by Mark A. Parsons
When checking to see if an ASE is properly licensed, SySam does not
take into account the number of virtual CPUs/processors. Virtual CPUS
are software threads running on a CPU.
SySam only accounts for physical CPUs and their individual cores.
Resolution
Given 4 CPUs that are each a quad(4) core, the number of CPU licenses
that would be required to make maximum use of all the CPU resources
that are available, would be 16.
===================================================
Alternatively, contact Sybase Sales ... 'course, they may not know
either, or you may get conflicting answers depending on who you speak
with.
Thanks very much for that. I may need to deal with the licensing issues
sometime.
But what I was really trying to ask about was from the technical point of
view, rather than from the sales point of view. For example, all the advice
regarding how many engines to configure (including the advice in the ASE
manuals) tends to talk about "the number of CPUs" that you have. It could be
"configure one engine per CPU" or "configure one fewer engines than the
number of CPUs", or whatever. My question is, what counts as one CPU? Seems
to me the advice can't make any sense unless everyone agrees what a "CPU"
is.
My Sun T5220 machine has one CPU, with 4 cores/CPU, and 8 threads/core. This
is 32 total "virtual processors", which is confirmed in the output of the
psrinfo, prtdiag, and mpstat commands. The man page for mpstat says it shows
one line "per processor". On my system mpstat shows 32 lines.
I guess from a sales point of view I have 4 CPUs. But what about from the
technical ASE point of view? Do I have 4 or 32 CPUs? If hypothetically
someone ordered me to configure one ASE engine per CPU, exactly how many
would I configure?
Thanks.
John Flynn
2009-11-24 17:22:59 UTC
Permalink
I've done a bit more research on this.

The "threads" in the Sun T2 processor appear to be analogous to the old
Hyperthreading in the Intel processors. I've found some old discussions
regarding THAT, and the basic advice at the time seemed to be: if you are
using Hyperthreading then you should consider each thread as if it was an
independent CPU.

Also, here is a recent document from Sun. I think it concerns the T1
processor, but the points should be relevant:
http://www.sun.com/servers/coolthreads/tnb/dbservers.jsp#ASE
It seems to confirm that each thread (I believe they call it a strand) is
like an independent CPU for the purpose of configuring ASE.

If that information is actually good info, then I think that answers my
question. For all technical purposes (aside perhaps from Sybase licensing)
my machine has 32 CPUs.
Manish Negandhi [TeamSybase]
2009-11-25 03:50:03 UTC
Permalink
The topic of hyperthreading is better explained in case no 11538493

here you go...


Wether or not you should use hyperthreading actualy turns out to be
very 'case by case' as to whether it is a benefit or a detriment. I
dug up a brief writeup on the subject I wanted to share with you. Most
of it you probobly already know, but it outlines Sybase's outlook on
hyperthreading fairly well:

------
Hyperthreading basically creates "virtual CPU's". This means for
example that an application that uses hyperthreading on a dual core
processor "thinks" it runs on a machine with four CPU's. For ASE this
does not make any difference as it will treat the virtual CPU's like
real CPU's. What can be done with hyperthreading is to have more ASE
engines running because there are "more" CPU's available, i.e.
physical CPU's + virtual CPU's. In terms of performance it could
actually slightly decrease it because the physical CPU's now have to
deal with the administrative overhead too that managing the
hyperthreading incurs. All of this is happening at system level and is
therefore the responsibility of the hardware manufacturer to test
whereas Sybase certifies ASE on an operating system level in general.

"New processor technologies have made it a requirement to understand
the characteristics of these technologies and their impact on
applications. Intel Xeon and some revisions of Pentium have built-in
hyperthreading to provide thread-level parallelism at the hardware
layer. Each clock cycle is thereby able to deliver more work. Some of
the other benefits of hyperthreading are:

- Support for multithreaded code and multitasking operations through
better use of processor resources
- Ability to run multiple threads/tasks simultaneously to increase the
number of transactions that can be executed
- Improved reaction and response times for end users
- Increases in the number of users a system can support

One of the most common problems users face is determining the number
of processors required to run applications when moving from slower
processors to faster processors. Some of the main points to consider
are:

- One 1.5 GHz CPU does not necessarily yield the same performance as
two 750 MHz CPUs. The variables that need to be considered include L1/
L2/L3 cache sizes, instruction cache sizes, memory latency, and cycles
per instruction.
- Hyperthreading provides the ability for one physical processor to
run two ASE engines. It is very important to understand that this is
not equivalent to running with two physical processors

-HTH
Manish Negandhi
[TeamSybase]
Post by John Flynn
I've done a bit more research on this.
The "threads" in the Sun T2 processor appear to be analogous to the old
Hyperthreading in the Intel processors. I've found some old discussions
regarding THAT, and the basic advice at the time seemed to be: if you are
using Hyperthreading then you should consider each thread as if it was an
independent CPU.
Also, here is a recent document from Sun. I think it concerns the T1
processor, but the points should be relevant:http://www.sun.com/servers/coolthreads/tnb/dbservers.jsp#ASE
It seems to confirm that each thread (I believe they call it a strand) is
like an independent CPU for the purpose of configuring ASE.
If that information is actually good info, then I think that answers my
question. For all technical purposes (aside perhaps from Sybase licensing)
my machine has 32 CPUs.
Loading...