Re: Recovery will take 10 hours - Mailing list pgsql-performance

From Brendan Duddridge
Subject Re: Recovery will take 10 hours
Date
Msg-id 5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com
Whole thread Raw
In response to Recovery will take 10 hours  (Brendan Duddridge <brendan@clickspace.com>)
Responses Re: Recovery will take 10 hours
List pgsql-performance
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.
>



pgsql-performance by date:

Previous
From: Brendan Duddridge
Date:
Subject: Re: Recovery will take 10 hours
Next
From: Gavin Sherry
Date:
Subject: Re: Recovery will take 10 hours