Re: Recovery will take 10 hours

From: Brendan Duddridge <brendan(at)clickspace(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Recovery will take 10 hours
Date: 2006-04-21 01:05:57
Message-ID: 5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)clickspace(dot)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.
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gavin Sherry 2006-04-21 01:15:28 Re: Recovery will take 10 hours
Previous Message Tom Lane 2006-04-21 00:30:55 UPDATE on many-column tables (was Re: [PERFORM] Performance decrease)