Re: postgresql.conf recommendations
От | Josh Krupka |
---|---|
Тема | Re: postgresql.conf recommendations |
Дата | |
Msg-id | CAB6McgWsKt5SjBPc-p8ifAySQy=9jKU8KFGCy20Cz0x+XPjKng@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: postgresql.conf recommendations (Johnny Tan <johnnydtan@gmail.com>) |
Ответы |
Re: postgresql.conf recommendations
|
Список | pgsql-performance |
Johnny,
Sure thing, here's the system tap script:
#! /usr/bin/env stap
global pauses, counts
probe begin {
printf("%s\n", ctime(gettimeofday_s()))
}
probe kernel.function("compaction_alloc@mm/compaction.c").return {
elapsed_time = gettimeofday_us() - @entry(gettimeofday_us())
key = sprintf("%d-%s", pid(), execname())
pauses[key] = pauses[key] + elapsed_time
counts[key]++
}
probe end {
printf("%s\n", ctime(gettimeofday_s()))
foreach (pid in pauses) {
printf("pid %s : %d ms %d pauses\n", pid, pauses[pid]/1000, counts[pid])
}
}
I was able to do some more observations in production, and some testing in the lab, here are my latest findings:Sure thing, here's the system tap script:
#! /usr/bin/env stap
global pauses, counts
probe begin {
printf("%s\n", ctime(gettimeofday_s()))
}
probe kernel.function("compaction_alloc@mm/compaction.c").return {
elapsed_time = gettimeofday_us() - @entry(gettimeofday_us())
key = sprintf("%d-%s", pid(), execname())
pauses[key] = pauses[key] + elapsed_time
counts[key]++
}
probe end {
printf("%s\n", ctime(gettimeofday_s()))
foreach (pid in pauses) {
printf("pid %s : %d ms %d pauses\n", pid, pauses[pid]/1000, counts[pid])
}
}
В списке pgsql-performance по дате отправления: