I'm trying to diagnose a server where the website is loading very slowly, but unfortunately my client has only provided me with FTP access.
我正在尝试诊断一个网站加载速度很慢的服务器,但不幸的是,我的客户端只向我提供了FTP访问。
I've got FTP access so I can upload PHP scripts, but can't set up any other server side tools.
我有FTP访问权限,所以我可以上传PHP脚本,但不能设置任何其他服务器端工具。
I have access to phpMyAdmin, but not direct access to the MySQL server. It is also unfortunately a Windows server (and we've been a Linux shop for over a decade now).
我可以访问phpMyAdmin,但不能直接访问MySQL服务器。不幸的是,它也是一个Windows服务器(我们已经做了十多年的Linux商店)。
So, if I wan to evaluate MySQL & disk speed performance through PHP on a generic server, what is the best way to do this?
那么,如果我想在通用服务器上通过PHP评估MySQL和磁盘速度性能,最好的方法是什么?
There are already tools like: https://github.com/raphaelm/php-benchmark or https://github.com/InfinitySoft/php-benchmark
已经有这样的工具:https://github.com/raphaelm/php-benchmark或者https://github.com/InfinitySoft/php-benchmark
But I'm surprised there isn't something that someone has already set up & configured to just run through and do some basic testing of a server's responsiveness.
但是我很惊讶,没有什么人已经设置好了,并且配置好了来运行,并对服务器的响应进行一些基本的测试。
Every time we evaluate a new server environment it's handy to be able to compare it to an existing one quickly to see if there are any anomalies. I guess I'd just hoped that someone else had written up a script to do this already. I know I have, but that was before Github when there was a handy place to post scraps of code like this.
每次我们评估一个新的服务器环境时,能够快速地将它与现有的环境进行比较,以查看是否存在异常。我想我只是希望有人已经写了一个脚本来做这件事。我知道我有,但那是在Github出现之前,当时有个很方便的地方可以发布这样的代码片段。
1 个解决方案
#1
0
You've probably already done this, but just in case... If I were in your shoes, the first thing I'd be looking at are the indexes on the mysql tables and the queries in the application. I've seen some sites get huge speed boosts just by fixing a join or adding a missing index.
你可能已经这样做了,但以防万一……如果我处在您的位置,我首先要看的是mysql表上的索引和应用程序中的查询。我看到有些网站仅仅通过修改连接或添加缺失的索引就获得了巨大的速度提升。
Don't forget to check the code for performance issues or calls to sleep(). If you haven't yet, it may be helpful to get the code running locally so you can run it through xdebug.
不要忘记检查代码的性能问题或对sleep()的调用。如果您还没有这样做,那么让代码在本地运行可能会有帮助,这样您就可以通过xdebug运行它。
#1
0
You've probably already done this, but just in case... If I were in your shoes, the first thing I'd be looking at are the indexes on the mysql tables and the queries in the application. I've seen some sites get huge speed boosts just by fixing a join or adding a missing index.
你可能已经这样做了,但以防万一……如果我处在您的位置,我首先要看的是mysql表上的索引和应用程序中的查询。我看到有些网站仅仅通过修改连接或添加缺失的索引就获得了巨大的速度提升。
Don't forget to check the code for performance issues or calls to sleep(). If you haven't yet, it may be helpful to get the code running locally so you can run it through xdebug.
不要忘记检查代码的性能问题或对sleep()的调用。如果您还没有这样做,那么让代码在本地运行可能会有帮助,这样您就可以通过xdebug运行它。