Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

讨论下服务器性能问题 #3

Open
hao-lee opened this issue Feb 15, 2017 · 0 comments
Open

讨论下服务器性能问题 #3

hao-lee opened this issue Feb 15, 2017 · 0 comments

Comments

@hao-lee
Copy link
Collaborator

hao-lee commented Feb 15, 2017

我的VPS有768M内存,现在论坛的用户有500名,帖子(包括主题)共892条,MongoDB占用内存122MB,应该算是挺多的了,Node进程占了166MB,也不小,全系统总共占用625M内存。全系统CPU占用率大约是 1%左右,系统负载是0.5-0.6左右,还能接受。我刚看到一篇评测主流NoSQL数据库性能的文章,里面有这么一张图片,从图中可以看出 MongoDB 占用的内存量远大于 Redis。

我还找到了这两篇文章:MongoDB与Redis的比较关于 redis、memcache、mongoDB 的对比

总的来说,似乎MongoDB的内存使用没法被限制,有多少用多少,官方建议将之放在单独的服务器上,而Redis可以设置数据过期时间,相对来说占内存小得多,最坏情况大不了牺牲读写性能,而这部分牺牲对小型论坛来说基本感知不到。

不知道大家的服务器各方面数据指标是怎样的,我觉得大家可以把数据都拿出来对比分析一下,看看如何使服务器性能达到最优化。相关的数据有:VPS配置、论坛用户量、帖子数量、数据库占用内存、node占用内存、系统负载、CPU占用率、总内存使用量等等。或者直接把Top命令的输出放上来也可以。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant