[PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention - Mailing list pgsql-odbc

From Adrian Grucza
Subject [PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention
Date
Msg-id CADF4wWpfy44sx0yTpcWmkvW_j-3-KCZDwaJnSK3H2+C+90DMCw@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention  (Dave Cramer <davecramer@postgres.rocks>)
List pgsql-odbc
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, 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 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

iress.com
Adrian Grucza  
Technical Lead
Office: +61390185800
adrian.grucza@iress.com
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

pgsql-odbc by date:

Previous
From: "Mahadevan, Vaijayanthy"
Date:
Subject: question on PostgreSQL ODBC driver
Next
From: Dave Cramer
Date:
Subject: Re: [PATCH] Using mimalloc to improve performance and reduce memory allocation lock contention