lz现在想用mongodb2.6作为数据存储,在虚拟机看了下mongodb和mysql内存占用,mongodb默认情况比mysql占用能小5M左右,但不知道数据量与io大的时候,是否还这样,各位能否给点建议
PHP中文网2017-04-24 09:12:23
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.