on 2019 Feb 06 12:10 PM
The move from processor to core licencing has left a few points of confusion around in v17:
The dblic utility says
C:\\Program Files\\SQL Anywhere 17\\Bin64>dblic /? SQL Anywhere Server Licensing Utility Version 17.0.9.4913 Usage: dblic [options] license_file ["user name" "company name"] @<data> expands <data> from environment variable <data> or file <data>Options (use specified case, as shown): -l <type> license type: perseat or core -k <key> registration key -o <file> append output messages to file -q quiet: do not display messages -u <n> number of users or processors for license
so the licence type talks about cores but asks for the number of processors. I thought it might be working on 1 processor = 4 cores, but when you try it, it does actually mean cores. The docs have the same issue.
If you want to find out how many cores your server is using, you have a problem. There are server properties for Physical Processors and Logical Processors, but not for cores. You can't tie this up with the License because the LicenseCount property gives the number of cores - although the docs say it means the number of licensed processors.
Ideally, as well as correcting the docs, there would be NumCores and NumCoresUsed properties.
All this information is nicely summarised when you start the engine, eg:
Processors detected: 8 logical processor(s) on 4 core(s) on 1 physical processor(s) Processor license restriction (licensed processors): all logical processors on at most 16 core(s) on any number of physical processors This server is licensed to use: all logical processors on at most 16 core(s) on any number of physical processors Processors in use by server: 8 logical processor(s) on 4 core(s) on 1 physical processor(s)but not accessible programmatically.
In addition a LicensesInUse property that worked in both pre-seat and core licensing situation would be very useful.
Try using sa_cpu_topology(): it will show you exactly with logical processors are in use as well as the core and physical processor (socket) they belong to.
Also, whenever you see "processor" all by itself, be suspicious: it is an ambiguous term unless it has a qualifier. "Physical processor" or "socket" refers to the chip that you plug into a motherboard. "Core" is unambiguous. "Logical processor" is a core or a thread of a core (for SMT or hyperthreaded CPUs).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks John, that gets me the info I need - I think this query gives me what I am after:
select (select count(*) from sa_cpu_topology() where online = 1) AvailableLogicalProcessors, (select count(*) from sa_cpu_topology() where online = 1 and in_use =1) UsedLogicalProcessors, (select count(distinct core) from sa_cpu_topology() where online = 1) AvailableCores, (select count(distinct core) from sa_cpu_topology() where online = 1 and in_use =1) UsedCores, (select count(distinct socket) from sa_cpu_topology() where online = 1) AvailableProcessors, (select count(distinct socket) from sa_cpu_topology() where online = 1 and in_use =1) UsedProcessors from Dummy
except of course for the doc updates 🙂
'core' is only unique for a given socket. You probably want "distinct socket, core".
And, of course, you would want your column names to be 'AvailablePhysicalProcessors' and 'UsedPhysicalProcessors' just to avoid ambiguity 😉
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.