Discuz Forum Speed Optimization Techniques

Source: Internet
Author: User
Tags apc pconnect

Discuz is one of the most popular stations in the building station source, in addition to open source also has a very powerful backstage, even if it is not built station Foundation and do not know the code of the webmaster can quickly set up a forum, or even the portal.

The loading speed of a website affects your user experience in addition to your ranking in search engines. New research shows that most users expect the site load time is 3 seconds, if the time is more than 3 seconds, the site began to lose users, so even if your site is beautiful, rich content looks like a work of art, but the load is very slow, but also futile. When you finish the Discuz section, user settings, plug-in installation and UI beautification, should you consider the speed of the website loading?

There are many ways to speed up the discuz, which is broadly divided into the following 10 articles:

1. Background performance optimization

2. Lazy Load Settings

3. Turn on gzip

4. Using CDN

5. Database optimization

6. Using Google Pagespeed

7. Template optimization

8. Plugin filtering

9. Image compression

10. Pseudo-Static

This article mainly introduces the first part of "Background performance optimization".

Discuz background performance optimizations include: Forum page cache settings, server optimization, and memory optimization

I. BACKGROUND > Global > Performance Optimization > Forum page cache Settings




Discuz background optimization, cache settings

Forum cache page settings can be divided into the following two kinds:

1. Cache Forum Home Validity: 0, Cache post validity: 0, Cache factor: 0

2. Cache Forum Home Validity: 900, cache post validity: 900, Cache factor: 40~60

The first setting is for the newly opened forum

The second setting is for a forum with a certain number of members and posts

In addition, the virtual host user recommends the use of the first setting to ease the pressure on the forum.

Second, background > Global > Performance Optimization > Server optimization




Discuz background settings, server optimization

Server optimization is also divided into two types:

1. General or small number of visits to the site settings: whether to optimize the update of the theme views: No, view on anti-refresh: No, download delay update: Yes, prohibit browser buffering: No, JS file directory: Cache directory, open image delay loading: Yes, other settings can not.

2. Access is large or very large setting method: whether to optimize the update topic Views: Yes, view number on anti-refresh: According to the actual situation, the recommended setting is No. Module Update time interval: 3-6 points best.

Third, background > Global > Performance Optimization > Memory optimization



Discuz background settings, memory optimization

Discuz background memory optimizations include Redis, Memcache, APC, Xcache, Eaccelerator, Wincache

Personal recommendation Memcache, regardless of which interface requires server support, and then through the Discuz configuration file "Config_global. PHP "Open

The config_global.php file is located in the Config directory

Open the config_global.php file to see line 18th, such as:

[CSS]View Plain Copy print?
  1. ———————— –config MEMORY —————————//
  2. $_config[' memory ' [' prefix '] = ' uqqyh2_ ';
  3. $_config[' memory ' [' Redis '] [' server '] = ";
  4. $_config[' memory ' [' Redis '] [' port '] = 6379;
  5. $_config[' memory ' [' Redis '] [' pconnect '] = 1;
  6. $_config[' memory ' [' Redis '] [' timeout '] = '0′;
  7. $_config[' memory ' [' Redis '] [' requirepass '] = ";
  8. $_config[' memory ' [' Redis '] [' serializer '] = 1;
  9. $_config[' memory ' [' memcache '] [' server '] = '127.0.   0.1′;
  10. $_config[' memory ' [' memcache '] [' port '] = 11211;
  11. $_config[' memory ' [' memcache '] [' pconnect '] = 1;
  12. $_config[' memory ' [' memcache '] [' timeout '] = 1;
  13. $_config[' memory ' [' APC '] = 0;
  14. $_config[' memory ' [' xcache '] = 0;
  15. $_config[' memory ' [' eaccelerator '] = 0;
  16. $_config[' memory ' [' wincache '] = 0;

Where $_config[' memory ' [' Redis '] [' server '] = "; and $_config[' memory ' [' memcache '] [' server '] = "; you need to add 127.0.0.1 in quotation marks, for example.

Other APC and Xchache only need to change 0 to 1.

The above settings can greatly increase the loading speed of the Discuz

Discuz Forum Speed Optimization Techniques

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.