为什么这个 Zend 框架会占用我的 CPU 并加载页面如此之慢

发布于 2024-10-05 21:14:17 字数 524 浏览 0 评论 0原文

我使用的框架称为 SocialEngine.net v4,它完全是用 Zend 编写的,因此它对 CPU 的消耗非常大。 SocialEngine 采用 PHP 语言并使用 MySQL。

我需要知道您建议使用什么操作系统、什么硬件(双至强、AMD、多少内存等)以及如何正确优化它以处理大量流量。

我现在只有 11k 用户,而且运行速度非常慢,我说的是 7 秒页面加载时间。

然而,该框架确实安装了 memcached 和 apc 缓存选项,但即使打开了 APC 或 Memcache,它也没有产生足够大的差异...

我需要知道就优化而言,攻击此问题的最佳方法是什么mysql、inoodb 调整、apache 调整、任何性能调整、硬件类型以及 RAM 数量。

我制定了一个非常大的营销计划,并且可能会开始每天增加 1,000 多个注册用户……因此流量将开始逐步上升。当我最初进行营销时,我在 6 小时内获得了 50k 独立用户、20k 注册量和 500k 页面浏览量...(服务器崩溃,失去了一半用户...从那以后就没有进行过营销,因为我一直在尝试重建)

The framework I am using is called SocialEngine.net v4, and it's completely written in Zend, so it's insanely super CPU intensive. SocialEngine is in PHP and uses MySQL.

I need to know what OS, what hardware you suggest (dual xeons, amd, how much ram, etc...) and how to optimize it properly to handle large amounts of traffic.

I only have 11k users right now, and it's running incredibly slow, I'm talking 7 second page load times.

The framework however does have memcached, and apc options for caching installed, but even with APC or Memcache on, it doesn't make a big enough difference...

I need to know what the best way to attack this is as far as optimizing mysql, inoodb tweaks, apache tweaks, any performance tweaks, what type of hardware, and amount of ram.

I have a very big marketing plan in place, and will probably start increasing traffic by 1,000+ signups per day... So traffic will start to rise very progressively. When I initially marketed, I did 50k uniques in 6 hours, 20k signups, and 500k pageviews... (server crashed, lost half my users... and haven't marketed since, because I been trying to rebuild)

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

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

发布评论

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

评论(3

错爱 2024-10-12 21:14:18

您可以从 xdebug 开始分析您的应用程序并找到瓶颈

You could start with xdebug to profile your application and find the bottleneck

岁月流歌 2024-10-12 21:14:18

诚实地?这只是我的观点,与其在一台服务器上花一大笔钱,不如购买许多小型服务器并对它们进行负载平衡。 Mac Mini 在这方面非常出色,并且能够运行其标准 OS X 或 Linux(如果您选择)。 10 台 500 美元的小型机器比 1 台 5000 美元的机器获得的性能要高得多。

Honestly? And this is just my opinion, instead of spending a small fortune on a single server - buy many small servers and load balance them. Mac Mini's are wonderful for this and are capable of running their standard OS X or Linux if you choose. You will get way more performance out of 10 small $500 machines than you will out of 1 $5000 machine.

清欢 2024-10-12 21:14:18

您无需向我们提供有关您的设置的任何信息。

你们有多少台服务器?他们正在运行什么服务?

当您说 APC 和 Memcached 已打开时,您是否确实将它们设置为实际工作?

您的 Apache 允许多少个连接?

你的 MySQL 配置是什么样的?内存设置是否优化?最重要的是您的所有表都正确索引了吗?你检查过你的慢查询日志吗?您是否针对查询运行过 EXPLAIN?

ZF 明智的,您是否缓存表元数据?您是否缓存不更改的表以节省网络流量?您查看过ZF官方优化指南吗?

另外...您为什么认为 ZF 会降低您的 CPU 使用率?

You don't provide us with any information about your set up.

How many servers do you have? What services are they running?

When you say APC and Memcached is on, have you actually set them up to actually work?

How many connections does your Apache allow for?

What is your MySQL configuration like? Is the memory settings optimised? Most importantly are all your tables indexed properly? Have you checked your slow query log? Did you run EXPLAIN for your queries?

ZF wise, are you caching your table metadata? Are you caching tables that don't change so that you save network traffic? Have you checked the official ZF optimisation guide?

Also... Why did you assume that ZF is killing your CPU usage?

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