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.

Status = recv sleep

2 posts in Windows NT Last posting was on 2000-01-31 18:16:56.0Z
Charles Monts Posted on 2000-01-28 20:20:56.0Z
From: "Charles Monts" <gti4monts@erols.com>
Subject: Status = recv sleep
Date: Fri, 28 Jan 2000 15:20:56 -0500
Lines: 7
Organization: Gusrdsman Technology, Inc.
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <6y5PX2ca$GA.306@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: nasi22.nasinc.com 207.96.58.246
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2619
Article PK: 1090067

I know there have been several messages on this subject in the last couple
of weeks, but I don't understand how, when there is only one user logged
into the database, they have a status of recv sleep when I know the SQL
being executed is retrieving one record from a table that has only eight
entries.


Tony Imbierski Posted on 2000-01-31 18:16:56.0Z
Message-ID: <3895D198.F99958E@sybase.com>
Date: Mon, 31 Jan 2000 18:16:56 +0000
From: Tony Imbierski <tonyi@sybase.com>
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Status = recv sleep
References: <6y5PX2ca$GA.306@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 43
NNTP-Posting-Host: chirico.sybase.com 158.76.102.96
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2605
Article PK: 1090056

recv sleep is quite normal. The server has issued a network read to the client
and sleeps until the read completes. In other words, we are waiting for the
client to send us a command. Log into a server with isql and you will sit in
recv sleep until you send some sql.

Also, remember that when running sp_who you are always likely to catch other
processes in wait states. For example, on a single engine system only 1
process will be running at a time, and of course the process you see in the
'running' state will be the one running sp_who itself. Other processes will
most often be caught in recv sleep or send sleep, because that is when they
yield the engine and that is when your process running sp_who gets to run. If
you run sp_who again, you may see the other process in the same sleep state
again, but what you don't see is that it has switched into running and back to
sleep maybe several times in the meantime.

Even on a multi-engine server, you are more likely to see other processes in
sleep states because the operations that cause sleeps usually take longer than
any raw processing that is required, especially with a fast cpu. Thus laws of
chance dictate that when sp_who looks, other processes will be sleeping rather
than processing. In reality processes dip into and out of sleep all the time.

cheers,
tonyi
ASE Engineering

Charles Monts wrote:

> I know there have been several messages on this subject in the last couple
> of weeks, but I don't understand how, when there is only one user logged
> into the database, they have a status of recv sleep when I know the SQL
> being executed is retrieving one record from a table that has only eight
> entries.