Re: Improve catcache/syscache performance.
Amul Sul <sulamul@gmail.com>
From: amul sul <sulamul@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-09-20T12:56:50Z
Lists: pgsql-hackers
Attachments
- 0007_ex_handle_oid.patch (application/octet-stream) patch
Patch 0007:
1:
400 + /*
401 + * XXX: might be worthwhile to only handle oid sysattr, to
reduce
402 + * overhead - it's the most common key.
403 + */
IMHO, let fix that as well. I tested this by fixing (see the attach patch)
but does
not found much gain on my local centos vm (of course, the pgbench load
wasn't big enough).
2: How about have wrapping following condition in SearchCatCacheMiss() by
unlikely():
if (IsBootstrapProcessingMode())
return NULL;
3: Can we have following assert in SearchCatCacheN() instead
SearchSysCacheN(), so that we'll assert direct SearchCatCacheN() call as
well?
Assert(SysCache[cacheId]->cc_nkeys == <N>);
Other than these concern, patch looks pretty reasonable to me.
Regards,
Amul
Commits
-
Improve sys/catcache performance.
- 141fd1b66ce6 11.0 landed
-
Add pg_noinline macro to c.h.
- a0247e7a11bb 11.0 landed
-
Add inline murmurhash32(uint32) function.
- 791961f59b79 11.0 landed