Many modern Linux distributions ship with the Transparent Hugepages feature enabled by default. When Linux uses Transparent Hugepages, the kernel tries to allocate memory in large chunks (usually 2MB), rather than 4K. This allocation can improve performance by reducing the number of pages the CPU must track. However, some applications still allocate memory based on 4K pages, which can cause noticeable performance problems when Linux tries to defragment 2MB pages.
To solve this problem, disable defrag for Transparent Hugepages:
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
For more information, including a temporary fix, see No DSE processing but high CPU usage.