X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DB58511F6031 for ; Thu, 20 Apr 2006 22:06:07 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.12 X-Spam-Level: X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43h4OfzVuwAS for ; Thu, 20 Apr 2006 22:06:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.clickspace.com (router2.clickspace.com [65.110.166.227]) by postgresql.org (Postfix) with ESMTP id 8B74311F8CC8 for ; Thu, 20 Apr 2006 22:06:04 -0300 (ADT) Received: from localhost ([127.0.0.1]) by mail.clickspace.com (using TLSv1/SSLv3 with cipher RC4-SHA (128 bits)); Thu, 20 Apr 2006 19:06:02 -0600 In-Reply-To: <44482CAF.70309@fuzzy.cz> References: <85A15B2E-F59C-4FEF-82D4-61F48ABDCDE5@clickspace.com> <29439.1145564220@sss.pgh.pa.us> <47C1F053-EC91-4AEB-9F0B-B538716145D6@clickspace.com> <105.1145567988@sss.pgh.pa.us> <53ACF10A-9240-420B-83AB-E4CBABD2AC56@clickspace.com> <44482CAF.70309@fuzzy.cz> Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com> Cc: PostgreSQL Performance Content-Transfer-Encoding: 7bit From: Brendan Duddridge Subject: Re: Recovery will take 10 hours Date: Thu, 20 Apr 2006 19:05:57 -0600 To: Tomas Vondra X-Mailer: Apple Mail (2.749.3) X-Archive-Number: 200604/486 X-Sequence-Number: 18570 Hi Tomas, Hmm... ktrace -p PID -c returns immediately without doing anything unless I've previously done a ktrace -p PID. According to the man page for ktrace's -c flag: -c Clear the trace points associated with the specified file or processes. When I run ktrace on OS X Server 10.4.6 it returns to the console immediately, however the ktrace.out file gets larger and larger until I issue another ktrace command with the -c flag. It never sits waiting for keyboard input. I haven't been able to find any way of generating the stats yet. The man page for ktrace or kdump doesn't mention anything about stats. Thanks, ____________________________________________________________________ Brendan Duddridge | CTO | 403-277-5591 x24 | brendan@clickspace.com ClickSpace Interactive Inc. Suite L100, 239 - 10th Ave. SE Calgary, AB T2G 0V9 http://www.clickspace.com On Apr 20, 2006, at 6:51 PM, Tomas Vondra wrote: >> So I tried ktrace -p PID and it created a really big file. I had >> to do >> 'ktrace -p PID -c' to get it to stop. >> >> The ktrace.out file is read using kdump, but there's a lot of binary >> data in there intermixed with some system calls. > > Yes, that's what (s|k)trace does - it attaches to the process, and > prints out all the system calls, parameters, return values etc. That > gives you "exact" overview of what's going on in the program, but it's > a little bit confusing if you are not familiar with that and/or you're > in a hurry. > > But Luke Lonergan offered a '-c' switch, which gives you a statistics > of the used system calls. This way you can see number of calls for > individual syscalls and time spent in them. That could give you a hint > why the process is so slow (for example there can be an I/O bottleneck > or something like that). > > Just do 'ktrace -p PID -c' for about 30 seconds, then 'Ctrl-C' and > post > the output to this mailing list. > > t.v. >