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.

Problems with Concurrency

2 posts in General Discussion Last posting was on 2011-01-21 15:54:30.0Z
RGS Posted on 2011-01-21 13:46:59.0Z
Sender: 24cd.4d38d035.1804289383@sybase.com
From: RGS
Newsgroups: sybase.public.ase.general
Subject: Problems with Concurrency
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4d398e53.3f5d.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Jan 2011 05:46:59 -0800
X-Trace: forums-1-dub 1295617619 10.22.241.41 (21 Jan 2011 05:46:59 -0800)
X-Original-Trace: 21 Jan 2011 05:46:59 -0800, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29885
Article PK: 79114

Hi!

I am using a ASE 15.0.2 in a IBM Server with 6 core duo
processors and 6 engines of Sybase

What are the conditions that a batch program has to have so
that it can run online, along
the other user transactions without blocking
the whole system?

Some conditions that I consider are:

- Do not run mass sentences on "tempdb" database
- Use a single thread of execution

What else?

Thanks!!


Rob V [ Sybase ] Posted on 2011-01-21 15:54:30.0Z
From: "Rob V [ Sybase ]" <robv@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: robv@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Problems with Concurrency
References: <4d398e53.3f5d.1681692777@sybase.com>
In-Reply-To: <4d398e53.3f5d.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: <4d39ac36$1@forums-1-dub>
Date: 21 Jan 2011 07:54:30 -0800
X-Trace: forums-1-dub 1295625270 10.22.241.152 (21 Jan 2011 07:54:30 -0800)
X-Original-Trace: 21 Jan 2011 07:54:30 -0800, vip152.sybase.com
Lines: 69
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29886
Article PK: 79115


On 21-Jan-2011 14:46, RGS wrote:
> Hi!
>
> I am using a ASE 15.0.2 in a IBM Server with 6 core duo
> processors and 6 engines of Sybase
>
> What are the conditions that a batch program has to have so
> that it can run online, along
> the other user transactions without blocking
> the whole system?
>
> Some conditions that I consider are:
>
> - Do not run mass sentences on "tempdb" database
> - Use a single thread of execution
>
> What else?
>
> Thanks!!

Basically, when a session is modifying data that is also accessed by
other sessions, you *may* get concurrency issues, which *may* impact
performance (but they also might not). Such issues primarily manifest
themselves as lock contention.
If you have such concurrency issues, you should be able to diagnose
these by looking at the 'LockWaits' columns in MDA tables, like
monOpenObjectActivity.

The things to focus on are the places where you insert/update/delete
data, and understand the length of such transactions. Keeping
transactions short is better: longer transactions are more likely to
cause more lock contention.
The classic example is a algorithm for generating primary keys, whereby
a key counter is stored in a row. For every new key, a session
increments that counter. This quickly becomes a serialization point with
increasing transaction rates and an increasing number of sessions (see
my Tips, Tricks and Recipes book for a discussion of the various key
generation algorithms and alternatives).

Turning to your two points; clearly, when you run everything in only a
single thread, there will not be any concurrency, and also no
concurrency problems. But using a single thread may be a bit artificial
as well as limit your throughput. Keep in mind that ASE manages
concurrency itself and a small amount of contention is normal; and it
may not lead to any significant performance degradation.
As for the other point: I *think* you're alluding to lock contention on
the system tables in tempdb, resulting from creating & dropping
temporary tables by (a high number of) concurrent sessions. This problem
has actually disappeared in 15.0.2, so that should no longer be a
limitation.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------