Drupal 5.x 站点显示 >每页消耗 550 MB 内存。如何加速 Drupal 5.x 网站
我在 Drupal 5.x 中开发了一个网站,现在它已经完成并且工作正常,但速度非常慢。有时工作速度很快,但对于 imp 模块来说需要时间。
当我查看性能日志时,每页至少消耗 150 MB 的内存。这是最小值。大多数页面显示 550~700 MB 的消耗。
到现在为止我做了什么。
- 启用 Javascript 聚合。
- 页面缓存已启用。
- 启用带宽优化。
- 不断检查下检查慢查询日志。
我的问题是,这个应用程序中内存消耗的影响是什么/如何影响的。 Drupal 自动获取数据库和代码之间的所有关系。我只开发了一些模块。
有哪些提示/技巧可用于提高我的网站速度。
I developed a site in Drupal 5.x and now its done and working fine, but its very slow. Working fast some time, but for imp modules it takes time.
When I see the performance logs, its consuming my memory for 150 MB per page MINIMUM. This is the minimum. Most of the pages its shows 550~700 MB consumption.
What I did till now.
- Javascript Aggregation Enabled.
- Page caching Enabled.
- Bandwidth Optimization Enabled.
- Slow query log checked under constant check.
My question, what/how exectaly the memory consumption is imp in this application. Drupal automatically takes all the relation between DB and code. Only some few modules are developed by me.
What the the tips/tricks can be used to improve my site speed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
150MB不会通过一些聚合、缓存调整等来固定。那只是调整。
您(似乎)的某个模块存在严重问题或配置错误。
如果您不了解cachegrind、xdebug 等,请执行以下操作:
请记住,单个站点上的 60 个模块已经算是相当多了。 100+被认为是一场噩梦。
如果这不起作用,或者您更喜欢更专业(然后试错)的方法,请尝试cachegrind。这将显示每个文件、每个例程的内存分析。您将需要cachegrind、Xdebug 和一个可视化cachegrind 输出的程序,例如kcachegrind(KDE,据报道也可以在Windows 上运行)。更多信息请参见: http://xdebug.org/docs/profiler
但我相信您会发现一个行为不当的模块,确定该模块将帮助您找到解决方案。
一个普通的 Drupal5 站点在 36M 内存下应该可以正常运行。
150MB will not be fixed with some aggregation, cache tuning and so on. That is only tweaking.
You (seem to) have a severe problem with one of your modules or a misconfiguration.
Here is what to do, if you are not known to cachegrind, xdebug and such:
Remember, 60 modules on a single site is considered rather much. 100+ is considered a nightmare.
If that does not work, or if you prefer a more prefessional (then trial-error) method, try cachegrind. That will show per-file, per-routine memory profiling. You will need cachegrind, Xdebug and a program to visualise the cachegrind output, such as kcachegrind (KDE, reported to work on windows too). More here: http://xdebug.org/docs/profiler
But I am confident that you will find one module that is misbehaving, and that pinning down that module will get you to the solution.
A normal Drupal5 site should run just fine under 36M of memory.