How can I disable swappiness just for Mariadb and not for other applications on the same EC2 Instance?
Plan A (if possible):  Use &quot;huge pages&quot; for the buffer_pool.  They can't be swapped, thereby helping keep from swapping MariaDB.
Plan B:  Use swappiness = 1 -- This, in theory, discourages the OS from swapping any process.  It will still swap if it is absolutely necessary.  At that point, perhaps it is better to slow down some process(es) rather than crashing?