public inbox for [email protected]
help / color / mirror / Atom feed[PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention
2+ messages / 2 participants
[nested] [flat]
* [PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention
@ 2024-03-25 05:41 Adrian Grucza <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Grucza @ 2024-03-25 05:41 UTC (permalink / raw)
To: [email protected]
Hi,
We have a multi-threaded Windows application that was experiencing delays
due to high lock contention in memory allocations from the PostgreSQL ODBC
driver. We tried modifying the driver to use mimalloc
<https://github.com/microsoft/mimalloc;, which is a memory allocator with
better performance characteristics. After deploying this change, the delays
due to lock contention disappeared. It has been running on thousands of our
production deployments for 9 months without issue.
I've created this pull request
<https://github.com/postgresql-interfaces/psqlodbc/pull/6; so that others
can benefit from this change by building the driver with the _MIMALLOC_
symbol defined and linking to the mimalloc library.
In my patch, the usage of mimalloc is off by default, so it should be safe
to merge. But I'd like to get people's thoughts on whether it should be
enabled by default so that people can benefit from this change without
having to build the driver themselves.
Regards,
Adrian
Adrian Grucza
Technical Lead
Office: +61390185800
[email protected]
www.iress.com
Level 16 385 Bourke St
Melbourne, Victoria, 3000
The contents of this email originated from Iress. For this purpose Iress includes Iress Limited and/or any of its subsidiaries, holding companies and trading entities. If you have received this email in error please notify the sender immediately and delete this email.
nosig
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention
@ 2024-03-25 10:59 Dave Cramer <[email protected]>
parent: Adrian Grucza <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Cramer @ 2024-03-25 10:59 UTC (permalink / raw)
To: Adrian Grucza <[email protected]>; +Cc: [email protected]
On Mon, 25 Mar 2024 at 01:42, Adrian Grucza <[email protected]> wrote:
> Hi,
>
> We have a multi-threaded Windows application that was experiencing delays
> due to high lock contention in memory allocations from the PostgreSQL ODBC
> driver. We tried modifying the driver to use mimalloc
> <https://github.com/microsoft/mimalloc;, which is a memory allocator with
> better performance characteristics. After deploying this change, the delays
> due to lock contention disappeared. It has been running on thousands of our
> production deployments for 9 months without issue.
>
> I've created this pull request
> <https://github.com/postgresql-interfaces/psqlodbc/pull/6; so that others
> can benefit from this change by building the driver with the _MIMALLOC_
> symbol defined and linking to the mimalloc library.
>
> In my patch, the usage of mimalloc is off by default, so it should be safe
> to merge. But I'd like to get people's thoughts on whether it should be
> enabled by default so that people can benefit from this change without
> having to build the driver themselves.
>
Cool,
Thanks, I will have a look
Dave
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-03-25 10:59 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 05:41 [PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention Adrian Grucza <[email protected]>
2024-03-25 10:59 ` Dave Cramer <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox