256MB RAM 云服务器足以运行 PHP 中的简单 Web 应用程序吗?
我编写了一个简单的 Web 应用程序,其中大部分都是静态网页,并嵌入了几个 YouTube 视频。表格很少等等。这一切都是使用 CodeIgniter 开发的。
该网站与学术地球非常相似。视频来自 Youtube。它有 400 个用户,只有 30-40 个活跃。
我对共享主机不感兴趣,想要一台具有 root 访问权限的计算机。我的预算允许我租用具有 256MB RAM 的 RackSpace 云服务器。
运行我的应用程序是否足够?
或者这个问题应该继续放在ServerFault上。
I have written a simple web application mostly full of static web pages with several you-tube embeddings. Few forms and so on. All this is developed using CodeIgniter.
The site is very similar to Academic Earth. With videos served from Youtube. It has got 400 users only 30-40 are active.
I am not interested in shared hosting and want a machine with root access. My budget allows me to hire RackSpace cloud server with 256MB Ram.
Is it sufficient to run my application?
Or should this question go on ServerFault.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,您可以在 256MB RAM 上运行一个简单的服务器。您可能希望查看诸如 http://www.lighttpd.net/ 而不是 Apache 的内容并执行一些操作调整设置(我读到 Debian 更擅长使用开箱即用的更少 RAM,但不确定这有多真实。)
阅读以下内容:
http://www.lowendbox.com/blog/yes-you-can-run-18-static-sites-on-a-64mb-link-1-vps/
Yes, you can run a simple server on 256MB RAM. You would want to look at things like http://www.lighttpd.net/ instead of Apache and do some tweaking to settings (I read that Debian is better at using less RAM out-of-the-box though not sure how true that is.)
Read this:
http://www.lowendbox.com/blog/yes-you-can-run-18-static-sites-on-a-64mb-link-1-vps/
我在 Slicehost 和 Linode 等小型 VPS 主机上运行应用程序取得了巨大成功。
您可能会对发行版的包管理器中的 apache/php/mysql 感到满意。我从源代码编译自己的 AMP 堆栈并进行调整,取得了良好的结果。 PHP 5.3.3 内置了 PHP-FPM(FastCGI 进程管理器),并提供了更好的 FastCGI 支持。
在 FastCGI 下运行 PHP 在内存不足的情况下可能会很冒险,因为您可以使用工作器 MPM 运行 apache,这比运行 prefork-apache/mod_php 更高效、更节省内存。
请注意,目前,Linode 将为您提供 512MB 的内存。服务器每月 20 美元。然而,根据我的经验,Linode 经常出现网络问题(请参阅 http://status.linode.com),但除此之外他们都很棒。
如果您每月只能支付 20 美元,那么您可能无法做得更好。这些 VPS 主机的另一个好处是,如果您以后需要扩展,只需在控制面板中单击几下,您就可以扩大服务器的规模。
I've had great success running apps on tiny VPS hosts like Slicehost and Linode.
You'll probably be fine with the apache/php/mysql from your distribution's package manager. I've had good results compiling my own AMP stack from source and tweaking things. With PHP 5.3.3, PHP-FPM (FastCGI Process Manager) is built in, and provides much better FastCGI support.
Running PHP under FastCGI can be adventageous in low-memory situations, since you can then run apache with the worker MPM, which is much more efficient, memory-wise than running prefork-apache/mod_php
Note that currently, Linode will give you a 512MB server for $20/month. However, my experience has been that Linode has semi-frequent network issues (see http://status.linode.com), but otherwise they've been great.
If all you can afford is $20/month, you probably can't do much better. The other nice thing about these VPS hosts is that if you need to grow later, all it takes is a couple of clicks in a control panel and you can upsize your server.