Piwi PHP 转换框架 - 扩展和性能?

发布于 2024-09-09 05:59:16 字数 305 浏览 7 评论 0原文

我最近继承了一个基于 Piwi 构建的简单 PHP 应用程序 (http://www.piwiframework.de/default.html )。有谁在高可用高并发场景下部署过这个框架吗?我考虑的是(至少)5000 个并发用户,2-3 小时的突发总计约 15-50k 个唯一会话。

我不是问 php 是否可以扩展,我知道我需要处理代码,我只是想确保 Piwi 控制器/数据库抽象没有任何已知问题。

I recently inherited a simple PHP application built on Piwi (http://www.piwiframework.de/default.html). Has anyone deployed this framework in a high-availability high-concurrency scenario? I was thinking about 5000 concurrent users (at least) with a 2-3 hour burst totaling about 15-50k unique sessions.

I'm not asking if php can be scaled, I know I will need to handle the code, I just want to make sure that the Piwi controllers/database abstractions don't have any known issues.

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

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

发布评论

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

评论(1

洛阳烟雨空心柳 2024-09-16 05:59:16

我是 Piwi 的开发者之一,所以我希望能给你一些提示:

到目前为止,我们的 bugtracker 尚未报告任何性能问题(http://code.google.com/p/piwi/issues/list)。

我没有将 Piwi 用于具有那么多并发用户的 Web 应用程序,但我做了一些性能测试。

这是我的测试设置和结果:
Apache 被用作网络服务器。
工具 JMeter 2.3.2 用于执行 HTTP 请求。
使用单个线程在循环中运行相同的请求(仅从服务器检索 HTML,不请求图像和 css 文件)。
我测量了服务器每秒可以处理的请求数,具体取决于页面的内容。每个测量重复三次(正常,启用缓存,作为静态 HTML 文件)。

Content               | normal | with Cache | static File 
Only text             |   11,9 |       12,7 |        64,7
Generator             |    9,0 |       13,0 |        64,2 
Generator with images |    8,8 |       12,7 |        64,7
Forms                 |   10,9 |       10,9 |        64,4

解读:

  • 缓存将性能提升高达 44%。即使是静态内容的交付速度也提高了 7%。这是因为只需执行一次 XSLT 转换(而不是两次)。
  • 生成器和数据库访问对整体性能影响不大。

我没有测量其他框架,所以我无法对总体性能做出任何声明。

您是否同时部署了该网站?我想听听你的经历。

I'm one of the developers of Piwi, so I hope I can give you some hints:

Till now no performance issues have been reported to our bugtracker (http://code.google.com/p/piwi/issues/list).

I did not use Piwi for webapplications with that many concurrent users, but I did some performance tests.

Here my test setup and the results:
Apache was used as a webserver.
The Tool JMeter 2.3.2 was used to perform HTTP-requests.
A single thread was used to run the same request in a loop (only HTML was retrieved from the server, no images and css files were requested).
I measured how many requests the server could handle per second, depending on the contents of the page. Every measure was repeated three times (normal, with caching enabled, as static HTML file).

Content               | normal | with Cache | static File 
Only text             |   11,9 |       12,7 |        64,7
Generator             |    9,0 |       13,0 |        64,2 
Generator with images |    8,8 |       12,7 |        64,7
Forms                 |   10,9 |       10,9 |        64,4

Interpretation:

  • Caching improves performance up to 44%. Even static contents are delivered 7% faster. This is due to the fact that only one XSLT transformation has to be performed (instead of two).
  • Generators and database access does not influence the overall performance very much.

I did not measure other frameworks so I can't make no statement about the general performance.

Did you deploy the website in the meantime? I would like to hear about your experience.

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