Drupal 6 网站速度很慢
我不久前使用 Drupal 6 为某人制作了此网站。问题是它变得非常慢...当我优化数据库时,它似乎有一段时间变快了,然后又变慢了...我几乎尝试了在谷歌上找到的所有内容,但似乎没有任何效果。也许这里有人比谷歌更了解一点? :p
I've made this website for someone a while ago, using Drupal 6. The problem is that it's getting incredibly slow... When I optimize the database it seems to go faster for a while and then it's slow again... I tried almost everything that I found on Google, and nothing seems to work. Maybe someone here knows a bit more than Google? :p
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在使用 PageSpeed 时注意到的一件事是,此页面上的一些图片 (http ://heuvelfolies.be/CMS/Producten)使用 HTML 和 CSS 调整大小,而不是显示缩略图。与您的数据库问题无关,但总体而言它将有助于页面加载。
输出示例:
http://heuvelfolies.be/img/Producten_Netten.jpg 在 HTML 或 CSS 中从 360x360 调整大小至 100x100。提供缩放图像可以节省 74.7KiB(减少 92%)
您是否使用其他缓存技术,例如 Memcached? Drupal 缓存将是第一步,正如您提到的那样,但下一步将是中间缓存系统。我对此非常幸运。
更新:您的主机似乎没有提供 VPS,因此如果您曾经迁移到 VPS,则需要执行此操作。话虽如此,共享服务器有其局限性。不知道服务器上的“其他人”正在运行什么可能会减慢整个过程,这是这些限制之一。
One thing I noticed using PageSpeed, is that some of your images on this page (http://heuvelfolies.be/CMS/Producten) are resized using HTML and CSS, rather than displaying thumbnails. Not related to your db issues, but overall it will help with page loading.
Example output:
http://heuvelfolies.be/img/Producten_Netten.jpg is resized in HTML or CSS from 360x360 to 100x100. Serving a scaled image could save 74.7KiB (92% reduction)
Are you using other caching techniques such as Memcached? Drupal caching would be step one, which you mentioned you did, but the next step would be an intermediate caching system. I've had great luck with it.
UPDATE: Doesn't look like your host provides VPS so this would be something to do if you ever moved to a VPS. Having said that, being on a shared server has its limitations. Not knowing what the "other guys" on the server are running that may be slowing the whole thing down, is one of those limitations.
您使用 Drupal 的内置缓存吗?
如果没有,请打开它 - 它可以产生很大的变化。
您可能还想研究基于服务器的缓存解决方案,例如 Varnish。
您使用什么模块?
您使用的模块可能存在已知问题。 Google 查找与您正在使用的各种模块相关的速度问题。
您是否在每个页面上显示动态内容?
这可能会减慢速度,因为无法缓存动态页面。考虑使用 AHAH 或 AJAX 在页面加载后通过 Javascript 加载页面的动态部分,以便将它们与主页面内容分开,然后您可以正确缓存它们。
Are you using Drupal's built-in caching?
If not, turn it on -- it can make a big difference.
You may also want to look into a server-based caching solution such as Varnish.
What modules are you using?
It's possible that you're using a module with known issues. Google for speed problems related to the various modules you're using.
Are you displaying any dynamic content on every page?
This can slow things down, as dynamic pages can't be cached. Consider using AHAH or AJAX to load the dynamic parts of the page via Javascript after page load, so they are separated from the main page content, which you can then cache properly.
我无法 ping 该服务器。也许您应该考虑更换托管?
其他值得检查的事情是启用缓存、启用 JS 和 CSS 文件合并。如果布局由许多图形组成,请考虑使用 CSS sprite。还要确保与数据库的连接速度很快。
I can't event ping that server. Maybe you should consider changing a hosting?
Other things worth checking are cache enabled, JS and CSS file merging enabled. If layout consists of many graphics, consider using CSS sprite. Also make sure that connection to your DB is fast.
在尝试改进任何内容之前,请检查管理页面上的“最近日志条目”。
网站速度缓慢的原因有很多,首先尝试确保没有错误。
我刚刚浏览了您的网站,它不是特别慢,也不是特别快。页面似乎没有挂起,但缩略图加载得不那么快。
检查您网站的运行状况,检查您的托管提供商,研究缓存,对于像 Varnish 这样的解决方案,您将需要 Pressflow 或 Drupal 7 以及 root 访问权限,这意味着至少有一个 VPS...
Before trying to improve anything, check the "Recent Log Entries" on the admin page.
There are so many reasons for a site being slow, first try to make sure that there's no errors.
I've just had a look at your site, it wasn't particularly slow, nor fast. Pages didn't seem to hang but thumbnails were not loading so quickly.
Check your site's health, check your hosting provider, look into caching, for solutions like Varnish, you will need Pressflow or Drupal 7 as well as root access, meaning at least a VPS...