Anything from here helps?
Configure db environment variables or config file for common memory related tweaks. Search forum and in general for mariadb config.