Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

role of a processor

9 posts in General Discussion Last posting was on 2009-07-28 02:39:25.0Z
vtpcnk Posted on 2009-07-23 10:47:12.0Z
Sender: 4ce9.4a66e8f1.1804289383@sybase.com
From: vtpcnk
Newsgroups: sybase.public.ase.general
Subject: role of a processor
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a683fb0.501f.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 23 Jul 2009 03:47:12 -0700
X-Trace: forums-3-dub.sybase.com 1248346032 10.22.241.188 (23 Jul 2009 03:47:12 -0700)
X-Original-Trace: 23 Jul 2009 03:47:12 -0700, forums-3-dub.sybase.com
Lines: 12
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28031
Article PK: 77277

what is the role of a cpu in sybase processing.

let us suppose i run a simple select without a where clause.
so at a high level : the query is sent to the server from
the front end. the server submits the request to the db.
then the results are fetched and sent back to the front end.

so is the cpu involved in all stages or only in particular
stages of the processing above?

also if the query involves sorting or computation will the
cpu be involved in these two processing as well?


"Mark A. Parsons" <iron_horse Posted on 2009-07-23 15:06:55.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
References: <4a683fb0.501f.1681692777@sybase.com>
In-Reply-To: <4a683fb0.501f.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 090721-0, 07/21/2009), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a687c8f$4@forums-3-dub.sybase.com>
Date: 23 Jul 2009 08:06:55 -0700
X-Trace: forums-3-dub.sybase.com 1248361615 10.22.241.152 (23 Jul 2009 08:06:55 -0700)
X-Original-Trace: 23 Jul 2009 08:06:55 -0700, vip152.sybase.com
Lines: 35
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28034
Article PK: 77281

Assuming by 'sybase processing' you are referring to a Sybase ASE dataserver ...

The dataserver is just a big piece of software.

Everything the dataserver (ie, software) does has to be performed by one or more cpu's, eg:

- process new connections/logins into the dataserver
- process network packets between application and dataserver
- parse incoming network packets
- compile queries
- run a wide range of ASE commands (eg, create table, create stored proc, update stats)
- run queries (stand alone, in stored procs, in triggers, perform aggregates, perform sorting, etc.)
- process IO requests between the dataserver and underlying OS
- manage lock usage
- manage its internal queues (process queues, IO queues)
- manage the dataserver's memory (proc cache, data cache, individual SPID memory stacks, etc)
- process connections/logouts from the dataserver
- and the list goes on and on and on and on and on ...

If this doesn't answer your question then you'll need to provide more details of exactly what you're looking for, and why.

vtpcnk wrote:
> what is the role of a cpu in sybase processing.
>
> let us suppose i run a simple select without a where clause.
> so at a high level : the query is sent to the server from
> the front end. the server submits the request to the db.
> then the results are fetched and sent back to the front end.
>
> so is the cpu involved in all stages or only in particular
> stages of the processing above?
>
> also if the query involves sorting or computation will the
> cpu be involved in these two processing as well?


vtpcnk Posted on 2009-07-23 15:26:55.0Z
Sender: 7f37.4a687fdc.1804289383@sybase.com
From: vtpcnk
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a68813f.162.1681692777@sybase.com>
References: <4a687c8f$4@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 23 Jul 2009 08:26:55 -0700
X-Trace: forums-3-dub.sybase.com 1248362815 10.22.241.188 (23 Jul 2009 08:26:55 -0700)
X-Original-Trace: 23 Jul 2009 08:26:55 -0700, forums-3-dub.sybase.com
Lines: 47
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28035
Article PK: 77282

thanks for the reply.

i am actually looking to understand worker processes.

so a lot of the processing is done by the cpu. so what
isn't?

in certain situations processes wait, right? to get locks
etc.

so is it in this wait time that a cpu can process other
requests? or if a cpu is processing a process, does it not
process other process during the wait time?

or is parallel processing possible only with multiple cpus?

and how do we determine the max number of worker processes
that we can configure for a dataserver?

> Assuming by 'sybase processing' you are referring to a
> Sybase ASE dataserver ...
>
> The dataserver is just a big piece of software.
>
> Everything the dataserver (ie, software) does has to be
> performed by one or more cpu's, eg:
>
> - process new connections/logins into the dataserver
> - process network packets between application and
> dataserver - parse incoming network packets
> - compile queries
> - run a wide range of ASE commands (eg, create table,
> create stored proc, update stats) - run queries (stand
> alone, in stored procs, in triggers, perform aggregates,
> perform sorting, etc.) - process IO requests between the
> dataserver and underlying OS - manage lock usage
> - manage its internal queues (process queues, IO queues)
> - manage the dataserver's memory (proc cache, data cache,
> individual SPID memory stacks, etc) - process
> connections/logouts from the dataserver - and the list
> goes on and on and on and on and on ...
>
> If this doesn't answer your question then you'll need to
> provide more details of exactly what you're looking for,
> and why.


Bret Halford [Sybase] Posted on 2009-07-23 18:13:21.0Z
From: "Bret Halford [Sybase]" <bret@sybase.com>
Organization: Sybase, Inc.
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
References: <4a687c8f$4@forums-3-dub.sybase.com> <4a68813f.162.1681692777@sybase.com>
In-Reply-To: <4a68813f.162.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a68a841$1@forums-3-dub.sybase.com>
Date: 23 Jul 2009 11:13:21 -0700
X-Trace: forums-3-dub.sybase.com 1248372801 10.22.241.152 (23 Jul 2009 11:13:21 -0700)
X-Original-Trace: 23 Jul 2009 11:13:21 -0700, vip152.sybase.com
Lines: 88
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28038
Article PK: 77285


vtpcnk wrote:
> thanks for the reply.
>
> i am actually looking to understand worker processes.
>
> so a lot of the processing is done by the cpu. so what
> isn't?
>
> in certain situations processes wait, right? to get locks
> etc.
>
> so is it in this wait time that a cpu can process other
> requests? or if a cpu is processing a process, does it not
> process other process during the wait time?
>
> or is parallel processing possible only with multiple cpus?
>
> and how do we determine the max number of worker processes
> that we can configure for a dataserver?

You are asking questions that are all over the map.

The cpu is down at the physical hardware layer. cpus handle
a lot of the processing of everything going on in the
computer. However, some work is done by other specialized
hardware - some machines have a dedicated floating point processor
to handle floating point math calculations. disk i/o is handled
by disk controller cards.

Typically there is an operating system program running on the cpus.
The operating system, among other things, schedules various processes
to run on the cpu, including scheduling itself.

ASE is an example of a program. When executing, ASE is one or more
processes known as dataserver engines. The OS swaps these processes
in and out of running on the cpu as needed.

ASE itself is something of an operating system, with the user
connections being the processes. ASE has a scheduler that
schedules user connections to run for various slices of time,
and these user connections get swapped in and out of the
engines as needed. Worker processes are much like login connection
processes - there is a configured pool of them and they get
temporarily assigned to a login connection to handle some
task and are then freed to return to the pool. While in use
they get scheduled for time just like any other login connection.


> so is it in this wait time that a cpu can process other
> requests? or if a cpu is processing a process, does it not
> process other process during the wait time?

There is a difference between synchronous and asynchronous requests.
cpu isn't the right layer to look at here. If a process makes
a synchronous request, it cannot continue processing until the request
returns. The cpu doesn't stop working though, rather when such a call
is made the process yields the CPU and the OS schedules some other
process to run. Once the synchronous call returns, the waiting process
will become runnable and will get scheduled to run again. With an
asynchronous call, the process does not have to yield but can continue
running doing other things. At the ASE scope, the currently running
connection (ASE scope process) yields the engine and some other
connection gets to run, but the engine (OS scope process) does not have
to yield the CPU.
the engine (

> or is parallel processing possible only with multiple cpus?

It depends on what you mean by the term. With a single cpu, only
one process can truly be executing at a specific point in time, but
it can certainly appear parallel to the casual observer. Worker
processes allow a single connection to perform more asynch calls
at the "same" time, which can be said to be waiting in parallel.


> and how do we determine the max number of worker processes
> that we can configure for a dataserver?

It isn't really a very good question - "far more than you could ever
use" is a good high-level response. The ASE docs indicate a maximum
value you can specify of "2147483647", but you are likely to run into
other limits such as available memory, file descriptors, etc. at
much lower values. Something like 3 times the number of actual
user connections would generally be far more than could be effectively
used. If you configure for some good-sized number, run some typical
usage and then check the "max_used" value in sp_monitorconfig "all"
output, that "max_used" value is probably a bit larger than ideal
for your current environment.


vtpcnk Posted on 2009-07-24 11:28:00.0Z
Sender: 7f37.4a687fdc.1804289383@sybase.com
From: vtpcnk
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a699ac0.4e83.1681692777@sybase.com>
References: <4a68a841$1@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 24 Jul 2009 04:28:00 -0700
X-Trace: forums-3-dub.sybase.com 1248434880 10.22.241.188 (24 Jul 2009 04:28:00 -0700)
X-Original-Trace: 24 Jul 2009 04:28:00 -0700, forums-3-dub.sybase.com
Lines: 29
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28043
Article PK: 77290


> vtpcnk wrote:
> > thanks for the reply.
> >
> > i am actually looking to understand worker processes.
> >
> > so a lot of the processing is done by the cpu. so what
> > isn't?
> >
> > in certain situations processes wait, right? to get
> > locks etc.
> >
> > so is it in this wait time that a cpu can process other
> > requests? or if a cpu is processing a process, does it
> > not process other process during the wait time?
> >
> > or is parallel processing possible only with multiple
> > cpus?
> > and how do we determine the max number of worker
> > processes that we can configure for a dataserver?
>
> You are asking questions that are all over the map.
>

brett thanks for the input.

i would appreciate it if could answer my questions in the
thread update stats, engines and worker processes?

that is what led to this. thanks.


vtpcnk Posted on 2009-07-24 11:38:34.0Z
Sender: 7f37.4a687fdc.1804289383@sybase.com
From: vtpcnk
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a699d3a.505f.1681692777@sybase.com>
References: <4a68a841$1@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 24 Jul 2009 04:38:34 -0700
X-Trace: forums-3-dub.sybase.com 1248435514 10.22.241.188 (24 Jul 2009 04:38:34 -0700)
X-Original-Trace: 24 Jul 2009 04:38:34 -0700, forums-3-dub.sybase.com
Lines: 8
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28044
Article PK: 77291

>ASE is an example of a program. When executing, ASE is one
or >more processes known as dataserver engines. The OS
swaps >these processes in and out of running on the cpu as
needed.

is this true in asynchronous processing? or are you talking
about a situation where an engine yields the cpu because it
has nothing else to do?


Bret Halford [Sybase] Posted on 2009-07-24 15:29:25.0Z
From: "Bret Halford [Sybase]" <bret@sybase.com>
Organization: Sybase, Inc.
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
References: <4a68a841$1@forums-3-dub.sybase.com> <4a699d3a.505f.1681692777@sybase.com>
In-Reply-To: <4a699d3a.505f.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a69d355$2@forums-3-dub.sybase.com>
Date: 24 Jul 2009 08:29:25 -0700
X-Trace: forums-3-dub.sybase.com 1248449365 10.22.241.152 (24 Jul 2009 08:29:25 -0700)
X-Original-Trace: 24 Jul 2009 08:29:25 -0700, vip152.sybase.com
Lines: 23
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28045
Article PK: 77292


vtpcnk wrote:
>> ASE is an example of a program. When executing, ASE is one
> or >more processes known as dataserver engines. The OS
> swaps >these processes in and out of running on the cpu as
> needed.
>
> is this true in asynchronous processing? or are you talking
> about a situation where an engine yields the cpu because it
> has nothing else to do?

It is true in asynchronous processing, but in the sense that yielding
the CPU is *not needed* when one makes an asynchronous call. The point
of asynchronous calls is the the process can continue processing
and so does not need to yield the cpu at that time.

Yields can be either volunatry or imposed by the OS. As ASE engine
yielding the cpu because it has nothing else to do (has exhausted
the runnable queue and exhausted the "loop when idle" busywork
specified by the "runnable process search count" sp_configure setting
would be an example of a voluntary yield. The OS swapping an ASE engine
out because it has reached the limits of it's current timeslice
would be an involuntary yield.


vtpcnk Posted on 2009-07-23 15:31:30.0Z
Sender: 7f37.4a687fdc.1804289383@sybase.com
From: vtpcnk
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a688252.238.1681692777@sybase.com>
References: <4a687c8f$4@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 23 Jul 2009 08:31:30 -0700
X-Trace: forums-3-dub.sybase.com 1248363090 10.22.241.188 (23 Jul 2009 08:31:30 -0700)
X-Original-Trace: 23 Jul 2009 08:31:30 -0700, forums-3-dub.sybase.com
Lines: 11
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28036
Article PK: 77283


> Assuming by 'sybase processing' you are referring to a
> Sybase ASE dataserver ...
>
> The dataserver is just a big piece of software.
>
> Everything the dataserver (ie, software) does has to be
> performed by one or more cpu's, eg:

btw there are concepts like "cpu bound" and "io bound"
right? so when reading data from the disk is the cpu being
used?


Jason L. Froebe [TeamSybase] Posted on 2009-07-28 02:39:25.0Z
From: "Jason L. Froebe [TeamSybase]" <jason@froebe.net>
Organization: TeamSybase
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: role of a processor
References: <4a687c8f$4@forums-3-dub.sybase.com> <4a688252.238.1681692777@sybase.com>
In-Reply-To: <4a688252.238.1681692777@sybase.com>
X-Enigmail-Version: 0.96.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a6e64dd$5@forums-3-dub.sybase.com>
Date: 27 Jul 2009 19:39:25 -0700
X-Trace: forums-3-dub.sybase.com 1248748765 10.22.241.152 (27 Jul 2009 19:39:25 -0700)
X-Original-Trace: 27 Jul 2009 19:39:25 -0700, vip152.sybase.com
Lines: 35
X-Authenticated-User: TeamSybase
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28058
Article PK: 77307


vtpcnk wrote:
>> Assuming by 'sybase processing' you are referring to a
>> Sybase ASE dataserver ...
>>
>> The dataserver is just a big piece of software.
>>
>> Everything the dataserver (ie, software) does has to be
>> performed by one or more cpu's, eg:
>
> btw there are concepts like "cpu bound" and "io bound"
> right? so when reading data from the disk is the cpu being
> used?

It doesn't look like the above was answered, so I'll give it a go..

CPU bound: a process that spends the vast majority of it's time on the
CPU doing some sort of processing. i.e the following will "sit and
spin" consuming CPU
10 REM Nothing here
20 goto 10

I/O bound: a process that spends the vast majority performing I/O of
some sort. Note that high CPU utilization (in System (kernel) / User
space) can show up when the data is being transfered from one buffer to
another (say from kernel space to user space).

really really simply (not taking into account file system buffers, DMA,
etc)... at every part from device driver to your application, cpu is
utilized:
disk hardware -> device driver => os kernel space (buffer) => user
space -> your application

does that help?

jason