| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: measuring spinning |
| Date: | 2012-06-14 21:39:40 |
| Message-ID: | CA+TgmobJECocmVbQ-O0aEzhPkXNUUxPDYxM9KgL+D0ZocRcXTg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jan 11, 2012 at 8:48 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> I've had cause, a few times this development cycle, to want to measure
> the amount of spinning on each lwlock in the system. To that end,
> I've found the attached patch useful. Note that if you don't define
> LWLOCK_STATS, this changes nothing except that the return value from
> s_lock becomes int rather than void. If you do define LWLOCK_STATS,
> then LWLockAcquire() counts the number of pg_usleep() calls that are
> required to acquire each LWLock, in addition to the other statistics.
> Since this has come up for me a few times now, I'd like to proposing
> including it in core.
Well, this fell through the cracks, because I forgot to add it to the
January CommitFest. Here it is again, rebased.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| Attachment | Content-Type | Size |
|---|---|---|
| spindebug-v2.patch | application/octet-stream | 3.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2012-06-14 21:40:17 | Re: [PATCH 06/16] Add support for a generic wal reading facility dubbed XLogReader |
| Previous Message | Andres Freund | 2012-06-14 21:38:33 | Re: [PATCH 06/16] Add support for a generic wal reading facility dubbed XLogReader |