在低规格 CPU 上使用哪个?

发布于 2024-07-13 15:46:36 字数 226 浏览 8 评论 0原文

我有一个专用服务器,我只是其中的用户。

处理器:AMD闪龙3100+ 内存:1GB DDR 我

正在使用 PHP 做网站。 它主要用于下载和上传等。

我目前使用apache,它消耗太多处理器。

所以我遇到了一些比apache更好的。 我需要知道哪一个适合下载/上传,nginx、lighttpd 还是 litespeed?

谢谢

I have a dedicated server where i'm only the user in it.

Processor : AMD Sempron 3100+
Memory : 1GB DDR I

I'm using PHP for website. Its mostly used for downloading stuff and uploading and so.

I currently using apache, it eats too much processor.

So i came across few better then apache. I need to know which one of this good for downloading/uploading, nginx, lighttpd or litespeed?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

紫罗兰の梦幻 2024-07-20 15:46:37

在我看来,很难击败 apache,也许看看启用禁用 mod_deflate 等可能会加快你的速度。

Its hard to beat apache in my opinion, perhaps look at enabling disable mod_deflate etc might speed things up for you.

扬花落满肩 2024-07-20 15:46:37

我在 AMD Geode LX800(500 MHz,256 MiB RAM)等“低端”机器中使用 PHP,使用 Debian 现有安装以及 Debian 提供的 Apache 2、PHP5 和 PostgreSQL 软件包。 一般来说,大多数事情都运行良好,但您想要处理冗长的操作(例如,避免使用 GD 扩展调整大图像的大小),并始终注意通常看起来“简单”的隐含操作成本。 我的特定应用程序为大约 25 个并发客户端提供服务,没有出现性能问题,并且在我的测试中,它在最多一百个并发客户端的情况下保持了不错的每个请求时间。

I have used PHP in machines as “low end” as an AMD Geode LX800 (500 MHz, 256 MiB of RAM), using a stock Debian install and the Apache 2, PHP5 and PostgreSQL packages provided by Debian. In general, most things work well, but you want to take care of lenghty operations (e.g. avoid resizing big images with the GD extension) and always be aware of the implied cost of operations which usually seems “easy”. My particular application was serving about 25 simultaneous clients without performance problems, and in my tests it maintained a decent time-per-request up to a hundred of simultaneous clients.

み格子的夏天 2024-07-20 15:46:37

您可能会发现安装APC会有很大帮助。 如果没有它或另一个字节码缓存,Apache 将不得不在每次调用时重新编译 PHP 文件。 虽然不需要太多努力,但加起来的速度却惊人地快。 您会惊讶地发现 64MB 对于 APC(在 1024Mb 中并不算太多)对您的系统有多大帮助,具体取决于您实际运行的代码量(您可能只需要 APC 的一半或四分之一)。

如果它是一个繁忙的网站,那么使用 Yslow 对其进行优化也会有所帮助,就像获取静态内容一样(如图)远离 Apache 服务器。 正是在这里,Nginx 可以对页面时间和内存使用进行小而快速的改进。 我自己就使用了独立图像服务器的技术,并且效果非常好。

You may find that installing APC will help a lot. Without it, or another byte-code cache, Apache will have to re-compile the PHP files on every invocation. While it doesn't take much effort, it does add up surprsingly quickly. You'll be surprised how useful 64MB for APC (which out of 1024Mb is not too much) will help your system, depending on how much code you are actually running (you may only need half or a quarter of that given to APC).

If it's a busy site, then optimising it with Yslow will also help, as will taking the static content (like image) away from having Apache server them. It's here that Nginx can make a small, fast improvement to page times, and memory use. I've used just that technique of a separate image server myself, and to excellent effect.

带上头具痛哭 2024-07-20 15:46:37

您可能想尝试 Nginx 将请求反向代理到 php-cgi 实例。 没有比这更斯巴达的了。
但我同意 Paul 的观点,就可维护性/可配置性而言,Apache 很难被击败。

You might want to try Nginx reverse-proxying requests to a php-cgi instance. Doesn't get any more spartan than that.
But I agree with Paul, Apache is hard to beat as far as maintainability / configurability goes.

小嗲 2024-07-20 15:46:37

我的猜测是你的性能问题与 PHP 代码有关,而不是 Apache。 因此,看看您是否可以优化您的 PHP 代码。

My guess is that your performance problems are related to the PHP code and not Apache. So look if you can optimize your PHP code instead.

缪败 2024-07-20 15:46:37

Zeus 是一款面向*Ahem*“静态内容”行业的高性能 Web 服务器。 它将以最少的资源提供圣经卷的文件。 我相信它使用异步 I/O,并且在普通硬件上速度非常快。

Zeus is a high-performance web server aimed at the *Ahem* 'Static Content' industry. It will serve biblical volumes of files with minimal resources. I believe it uses asynchronous I/O, and is very quick on modest hardware.

九局 2024-07-20 15:46:37

我推荐 Apache,但仅限 2.2.x

这是一个已完成的小型基准测试。 正如你所看到的,服务 php,Apache 2.2.2 比 lighty 更好

I would recommend Apache but only 2.2.x

Here's a small benchmark that was done. and as you can see, serving php, Apache 2.2.2 is better than lighty

北方的韩爷 2024-07-20 15:46:37

当然,我建议 lighttpd。 我在不同的重负载服务器上使用它,它很有帮助!

Definitely, I suggest lighttpd. I'm using it on different heavy load servers and it helped a lot!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文