percona-xtradb-cluster-operator icon indicating copy to clipboard operation
percona-xtradb-cluster-operator copied to clipboard

K8SPXC-1327: Make jemalloc the default memory allocator

Open kamil-holubicki opened this issue 10 months ago • 2 comments

K8SPXC-1327 Powered by Pull Request Badge

https://perconadev.atlassian.net/browse/K8SPXC-1327

Problem: By default, standard libc allocator is used by PXC. It is often desirable to use jemalloc instead. To do so, use has to configure LD_PRELOAD environment variable. The only way to do this is through k8s secret.

Solution: Extended PodSpec object with MySqlAllocator property. If it is empty, omitted or set to 'jemalloc', LD_PRELOAD env variable pointing to jemalloc library will be exported. Otherwise the default allocator will be used.

CHANGE DESCRIPTION

Problem: Short explanation of the problem.

Cause: Short explanation of the root cause of the issue if applicable.

Solution: Short explanation of the solution we are providing with this PR.

CHECKLIST

Jira

  • [ ] Is the Jira ticket created and referenced properly?
  • [ ] Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • [ ] Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • [ ] Is an E2E test/test case added for the new feature/change?
  • [ ] Are unit tests added where appropriate?
  • [ ] Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • [ ] Are all needed new/changed options added to default YAML files?
  • [ ] Are all needed new/changed options added to the Helm Chart?
  • [ ] Did we add proper logging messages for operator actions?
  • [ ] Did we ensure compatibility with the previous version or cluster upgrade process?
  • [ ] Does the change support oldest and newest supported PXC version?
  • [ ] Does the change support oldest and newest supported Kubernetes version?

kamil-holubicki avatar Mar 14 '25 14:03 kamil-holubicki

CLA assistant check
All committers have signed the CLA.

it-percona-cla avatar Mar 14 '25 14:03 it-percona-cla

Test Name Result Time
affinity-8-0 failure 00:02:49
auto-tuning-8-0 passed 00:19:52
cross-site-8-0 passed 00:35:49
custom-users-8-0 failure 00:09:52
demand-backup-cloud-8-0 passed 01:00:22
demand-backup-encrypted-with-tls-8-0 passed 00:45:41
demand-backup-8-0 passed 00:42:02
demand-backup-flow-control-8-0 passed 00:10:48
demand-backup-parallel-8-0 passed 00:09:37
demand-backup-without-passwords-8-0 passed 00:16:26
haproxy-5-7 passed 00:14:59
haproxy-8-0 passed 00:15:16
init-deploy-5-7 failure 00:08:56
init-deploy-8-0 failure 00:09:02
limits-8-0 failure 00:03:13
monitoring-2-0-8-0 failure 00:12:37
monitoring-pmm3-8-0 failure 00:11:24
one-pod-5-7 failure 00:04:09
one-pod-8-0 failure 00:03:36
pitr-8-0 passed 00:45:51
pitr-gap-errors-8-0 passed 01:01:26
proxy-protocol-8-0 failure 00:09:08
proxysql-sidecar-res-limits-8-0 passed 00:08:27
pvc-resize-5-7 passed 00:16:43
pvc-resize-8-0 passed 00:16:13
recreate-8-0 passed 00:17:53
restore-to-encrypted-cluster-8-0 failure 00:17:40
scaling-proxysql-8-0 passed 00:08:42
scaling-8-0 passed 00:11:34
scheduled-backup-5-7 passed 01:05:44
scheduled-backup-8-0 passed 01:05:13
security-context-8-0 failure 00:10:05
smart-update1-8-0 passed 00:35:35
smart-update2-8-0 passed 00:39:00
storage-8-0 failure 00:06:31
tls-issue-cert-manager-ref-8-0 passed 00:09:19
tls-issue-cert-manager-8-0 passed 00:11:46
tls-issue-self-8-0 passed 00:13:23
upgrade-consistency-8-0 failure 00:09:35
upgrade-haproxy-5-7 failure 00:14:47
upgrade-haproxy-8-0 failure 00:13:49
upgrade-proxysql-5-7 failure 00:15:49
upgrade-proxysql-8-0 failure 00:14:28
users-5-7 failure 00:12:00
users-8-0 failure 00:02:14
validation-hook-8-0 passed 00:01:44
Summary Value
Tests Run 46/46
Job Duration 02:26:49
Total Test Time 14:51:34

commit: https://github.com/percona/percona-xtradb-cluster-operator/pull/2002/commits/42929599314905f25139cd6cda4da0257bc87212 image: perconalab/percona-xtradb-cluster-operator:PR-2002-42929599

JNKPercona avatar Nov 04 '25 10:11 JNKPercona

please also have a look on the unit tests cause they are failing due to the proposed changes. 🙏🏽

gkech avatar Nov 04 '25 12:11 gkech

I'll address comments and fix tests

egegunes avatar Nov 06 '25 05:11 egegunes

since I can not push to Kamil's fork, creating a new PR. Closing this in favor of #2259

egegunes avatar Nov 20 '25 10:11 egegunes