深入了解我拥有的一些 Web 应用程序的内存使用情况

发布于 2024-11-07 08:09:05 字数 734 浏览 0 评论 0原文

我有 3 个基于 PHP Web 的应用程序,正在评估它们的内存使用情况。一个是带有最少扩展/插件的 WordPress 网站,另一个是使用 Code Igniter 构建的社交网络应用程序,另一个是从头构建的项目管理系统 (BFS)。

用于呈现每个应用程序页面的平均内存如下:

  • Word Press 项目 - 13 MB
  • Code Igniter 项目 - 3 MB
  • BFS 项目 - 4 MB

我对这些数字的反应和问题是:

a) 哇,wordpress 使用 433比 CI 项目多 % 的内存。我什至还没有安装任何精美的 WP 插件。 WP 被认为是内存大户吗?如果是这样,我是否应该担心该网站与某些业务关键型 Web 应用程序位于同一服务器上?

b) 很好,BFS 项目与代码点火器项目位于同一个球场。我对如何优化 BFS 项目中的内存使用有一些想法。我针对这个想法进行了一些实验,并且能够将内存使用率提高 25%(因此,产生 3mb/页负载,就像 CI prj 一样)。重构整个系统需要 1-2 周的时间。我对此事的问题是:

i) 优化 25% 的内存效率是否值得?请记住,WP 使用的内存多了 433%,并且执行的操作少于 BFS 和 CI 项目

ii) 如果 i) 是,那么今天是执行此操作的日子吗?该 BFS 项目正处于启动阶段,计划雄心勃勃地推出新功能。如果我今天不进行优化,我是否会面临承担大量技术债务的风险?

好的,这就是我的问题

I have 3 PHP web based applications that I'm evaluating for memory usage. One is a Wordpress website with minimal extensions/plugins, another is a social networking application built with Code Igniter, and another is a project management system built from scratch (BFS).

The average memory used to render a page for each of these applications are as follows:

  • Word Press Project - 13 MB
  • Code Igniter Project - 3 MB
  • BFS Project - 4 MB

My reaction and questions to the numbers are:

a) Wow, wordpress uses 433% more memory than the CI project. And I haven't even installed any fancy WP plugins yet. Is WP considered a memory hog? If so, should I be concerned about this website sitting on the same server as some business critical web applications?

b) Nice, the BFS project is in the same ball park as the code igniter project. I had some ideas on how to optimize memory usage in the BFS project. I ran some experiments against the idea and was able to improve memory usage by 25% (thus, yielding 3mb/page load, just like CI prj). Refactoring the entire system will take 1-2 weeks worth of work. My questions on this matter are:

i) Is it worth it to optimize for 25% memory efficiency? Keep in mind WP uses 433% more memory and while doing less than the BFS and CI project

ii) if yes to i), is TODAY the day to do it? This BFS project is in start up phase with ambitious plans for new features. Do I risk incurring dangerous amounts of technical debt going forward if I don't optimize today?

Ok, so those are my questions

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

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

发布评论

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

评论(2

煮酒 2024-11-14 08:09:05

Wordpress 不被认为是内存消耗大户,如果使用设计良好的插件并使用某种缓存机制,则可以很好地优化。您从中获得的好处是一个强大的系统,您可以更快地将其推向市场。 CI 更像是一个传统的框架,并且重量非常轻,所以这也很好,但同样,您不能仅使用插件来获得您想要的功能。我肯定会坚持使用代码 Igniter,因为它是“优化”的,可以重新开始。 1-2 周的时间大约是 80 小时,无论您认为适合自己的小时费率如何。还要记住,雄心勃勃并不一定意味着结果。

Wordpress is not considered a memory hog and can be optimized quite well if well designed plug ins are used along with using some sort of caching mechanism. The benefits you get with that is a robust system that you can take to the market quicker. CI is more like a traditional framework and is very light weight so that is nice also but again you can't just use a plugin and get you the functionality you desire. I would surely stick with code Igniter since it is "optimized" to begin again. 1-2 weeks of time is about 80 hours at whatever hourly rate you deem worthy for yourself. Also remember that being ambitious does not necessarily mean results.

断桥再见 2024-11-14 08:09:05

我同意 milofaris,你也可以尝试 eAcclerator 或 Memcache。它们都非常适合 PHP 优化 Web 应用程序。

这是一个很棒的链接: http://www .haughin.com/2008/02/13/optimizing-and-scaling-your-codeigniter-application/

我的 CodeIgniter 项目过去运行 5MB。使用 eAcclerator 后,它现在运行的大小不到 2MB。

I agree with milofaris, you could also try eAcclerator or Memcache. They're both great for PHP in optimizing web apps.

Here's a great link: http://www.haughin.com/2008/02/13/optimizing-and-scaling-your-codeigniter-application/

My CodeIgniter project used to run 5MB. After using eAcclerator, it now runs less than 2MB.

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