search

Home  >  Q&A  >  body text

小内存的VPS中使用MongoDB是否合适?

个人写的一个小站,用MongoDB作为数据库,最近准备上线。

正好VPS即将到期,准备换Linode 512MB那款,听说MongoDB很耗内存,不知道跑起来会不会卡,会占用多少内存呢?要不要做什么优化?
如果不合适,那至少要多大的内存才适合跑MongoDB呢?

大家讲道理大家讲道理2839 days ago725

reply all(8)I'll reply

  • 迷茫

    迷茫2017-04-21 11:20:02

    Mongodb cannot regulate its memory size. It uses as much memory as it has, so some people say that it will occupy more memory, but if the memory is not enough, it will not occupy it. Of course, disk swapping is performed at this time, performance It will get worse depending on your thermal data. My suggestion is to just keep your own small site, that is, you will know when the mule is pulled out by the horse, and mognodb's horizontal expansion is very convenient, so you don't have to worry about future expansion issues.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-21 11:20:02

    There is no need to use mongodb for vps business. If you play around, mongodb has very high memory performance, but if the memory is not enough, it will not occupy excess memory and will only write to the disk, so the performance is very low. In short, the machine will not hang because mongodb eats memory.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:20:02

    It depends on your application, how much data it expects to have in total, how much hot data is included, how much memory it needs to occupy, and then look at the free memory of the VPS to know whether it is suitable.

    reply
    0
  • 迷茫

    迷茫2017-04-21 11:20:02

    I also plan to use mongodb. I support the poster’s use. Personal website is nothing more than tossing. You can find opportunities to practice more

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:20:02

    Since it is a vps, the business volume is definitely not much, so why use mongodb? The simplest way is to use sqlite or mysql. There is no need to use mongodb

    reply
    0
  • 高洛峰

    高洛峰2017-04-21 11:20:02

    It’s better not to use this thing! Use database for vps

    reply
    0
  • 高洛峰

    高洛峰2017-04-21 11:20:02

    I think a database would be more suitable.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:20:02

    There is no need to try mongodb with vps,

    reply
    0
  • Cancelreply