Make memory allocation with NUMA enabled multi-threaded

Description

Currently, memory allocation is done on a single thread.

The suggestion is to create threads for memory allocation based on the number of NUMA sockets to improve performance.

Environment

None

AFFECTED CS IDs

253774, 275770, CS0035883

Smart Checklist

Activity

Show:

Julia Vural March 4, 2025 at 9:05 PM

It appears that this issue is no longer being worked on, so we are closing it for housekeeping purposes. If you believe the issue still exists, please open a new ticket after confirming it's present in the latest release.

Михаил Григорьев May 5, 2023 at 2:20 PM

Hi

I confirm there is a problem with a large delay in starting Percona Server for MySQL 8 with a large innodb_buffer_pool (> 1Tb) with the innodb_numa_interleave option enabled

Examples delay for start:

My mysql settings:

Having the innodb_buffer_pool_populate option to disable the MAP_POPULATE flag would solve this problem

Przemyslaw Malkowski May 4, 2023 at 10:21 AM

Making this additional step of using MAP_POPULATE an option is really important for instances with a big buffer pool. The extra delay introduced by it is reported to be, for example, 10 minutes for a 1TB buffer pool.

Also, we currently don't have a way to allow identical behavior as MySQL Community. 

Marcelo Altmann June 3, 2020 at 7:03 PM
Edited

Currently, our implementation 8.0 is already multi-thread (so does upstream).

The difference comes from the reverted patch https://jira.percona.com/browse/PS-3967 .  

At https://github.com/percona/percona-server/pull/2350/files#diff-0c2740ef711b4c6e93024775d781af10R182 we also pass MAP_POPULATE flag to mmap, and this is where the time difference is coming from. 

The solution here will be to create a new variable to allow the user to control if MAP_POPULATE will be passed. Looks like this was an option before 5.7 - https://www.percona.com/doc/percona-server/5.6/performance/innodb_numa_support.html#innodb_buffer_pool_populate

 

Also, the scope of this ticket is to back-port multi-thread allocation to 5.7

Sveta Smirnova April 15, 2020 at 1:58 PM

Converted to bug, because it is repeatable with Percona Sever only now.

Won't Do

Details

Assignee

Reporter

Time tracking

1h 45m logged

Priority

Smart Checklist

Created May 1, 2019 at 6:43 PM
Updated March 6, 2025 at 9:40 AM
Resolved March 4, 2025 at 9:05 PM