doudong0425 2016-07-21 05:31
浏览 9
已采纳

如何在我的网站中找到我的哪个文件使用更多RAM

I have a opencart website and hosted that in SSD special hosting. Maximum allowed RAM usage is 5GB. I have nearly 25,000 visitors per day. When my RAM usage goes to 100%, the website loads at very slow speed. When i contacted the hosting team, they said there is some files which uses more RAM. Can you please tell me how to find that file.

Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dongzi9196 2016-07-21 06:22
    关注

    To figure out which files use the most memory, you will need to use PHP memory profiling tools. You can find more info about them here: PHP memory profiling

    General profiling tools might also be useful: Simplest way to profile a PHP script

    Also, 5GB is a very small amount of memory for a server, especially if you have 25k+ visitors a day. I honestly doubt it's possible to optimize a PHP script so much, that it would run smoothly for 25k visitors on just 5GB of RAM. Just think about it this way - if you have a 1000 visitors at the same time (with 25k a day, your peak might even be higher) then each user will only have 5mb of memory, which is not enough to even start an Apache instance, so of course the server will slow down, until memory is freed up.

    My first step in this situation would be to upgrade a server and only then bother with profiling.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了