Re: Seeing the same session_id used on different nodes alot in RAC 11g

From: Riyaj Shamsudeen <riyaj.shamsudeen_at_gmail.com>
Date: Fri, 27 Feb 2015 09:14:32 -0800
Message-ID: <CAA2DszyeLOy2oKexKKCy9BzPt-EU-306DDMqaUT=kTxm1AD3qA_at_mail.gmail.com>



Minor correction: x$kuse is not just an array, it is a segmented array, which means that linked list is in-built.

Cheers

Riyaj Shamsudeen
Principal DBA,
Ora!nternals - http://www.orainternals.com - Specialists in Performance, RAC and EBS
Blog: http://orainternals.wordpress.com/ Oracle ACE Director and OakTable member <http://www.oaktable.com/>

Co-author of the books: Expert Oracle Practices <http://tinyurl.com/book-expert-oracle-practices/>, Pro Oracle SQL, <http://tinyurl.com/ahpvms8> <http://tinyurl.com/ahpvms8>Expert RAC Practices 12c. <http://tinyurl.com/expert-rac-12c> Expert PL/SQL practices <http://tinyurl.com/book-expert-plsql-practices>

<http://tinyurl.com/book-expert-plsql-practices>

On Fri, Feb 27, 2015 at 9:00 AM, Riyaj Shamsudeen < riyaj.shamsudeen_at_gmail.com> wrote:

> It's been a while, I researched this, things may have changed recently:
> x$ksuse is the externalization of the session memory array (and a few other
> x$ table were also externalizing that memory area starting with x$ksuse*).
> There is also a freelist (a doubly linked list, I think) keeping track of
> free slots in the array, protected by a latch. At the session logoff time,
> that sid is added to the head of the linked list. At session logon time,
> the element from the head of the list is assigned. That's the reason why
> same sid is reused if you logoff and login quick succession.
>
>
> Cheers
>
> Riyaj Shamsudeen
> Principal DBA,
> Ora!nternals - http://www.orainternals.com - Specialists in Performance,
> RAC and EBS
> Blog: http://orainternals.wordpress.com/
> Oracle ACE Director and OakTable member <http://www.oaktable.com/>
>
> Co-author of the books: Expert Oracle Practices
> <http://tinyurl.com/book-expert-oracle-practices/>, Pro Oracle SQL,
> <http://tinyurl.com/ahpvms8> <http://tinyurl.com/ahpvms8>Expert RAC
> Practices 12c. <http://tinyurl.com/expert-rac-12c> Expert PL/SQL practices
> <http://tinyurl.com/book-expert-plsql-practices>
>
> <http://tinyurl.com/book-expert-plsql-practices>
>
>
> On Fri, Feb 27, 2015 at 7:47 AM, Mladen Gogala <
> dmarc-noreply_at_freelists.org> wrote:
>
>> On 02/27/2015 10:17 AM, Jeremy Schneider wrote:
>>
>>> This is a guess, but I think the session_id is just an offset into a
>>> memory array of session info.
>>>
>>
>> Yes, it is. And serial# is just the number of the times that the session
>> slot has been reused.
>>
>> --
>> Mladen Gogala
>> Oracle DBA
>> http://mgogala.freehostia.com
>>
>> --
>> http://www.freelists.org/webpage/oracle-l
>>
>>
>>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 27 2015 - 18:14:32 CET

Original text of this message