What you care about should not be who takes up 5M more memory, but who can handle your database read and write requests better and faster. I'm not very familiar with MySQL. MongoDB uses memory mapping. After your data is accessed, it will remain in the memory until the memory is full. Therefore, it is generally not recommended to run other processes on the mongo server because Mongo can use all your memory. The advantage is that if your memory is large enough to hold all the data, the read and write performance will be much better.
What you care about should not be who takes up 5M more memory, but who can handle your database read and write requests better and faster. I'm not very familiar with MySQL. MongoDB uses memory mapping. After your data is accessed, it will remain in the memory until the memory is full. Therefore, it is generally not recommended to run other processes on the mongo server because Mongo can use all your memory. The advantage is that if your memory is large enough to hold all the data, the read and write performance will be much better.