Jump to content

Questions and Answers about high performance IPB forums


Recommended Posts

Posted

Hello great IPB community :)

I am creating this topic to help users with questions about basic instructions and things to keep in mind for high performance IPB forums.

Almost daily users asking about how to do ipb forum run faster and that's good.

First of all i will point some basic info and not full details as every server has different hardware and optimization can't be in general and also because i am offering it as a paid service :) At the end i am sure with a little research that you will be in a much better position than you are now.Also all the bellow info/ideas are based on my personal experience and benchmarks.

Let's start !

1)First thing to have in mind is that you need a dedicated server and not use any shared hosting or vps with limited cores/ram/network/ssd..... (If you just start with IPB or you have a small forum then you can go with a VPS).

2)Find a datacenter as close as possible to your visitors country.Don't give them high ping times without a reason.US and EU has datacenters with very low prices...Search and find them as it may not allowed to post them here.

3)Try to get a server with an ssd disk and network speed minimum 100Mbit within your budget.As many ask better to look for cpu or ram there is no simple answer as both are important.So just try to balance them according to your budget again.

4)Consider using Cloudflare in front of your forum as it is free and it will help a LOT.

5)Install a solid server OS like Centos 64bit.

6)Optimize the kernel values like:

net.core.somaxconn
fs.file-max
vm.swappiness

7)Ping a few known DNS providers and setup the faster for your server,Most of the times Google ones will be fine but it is good to set a third one from your provider and auto rotate on fail.

8)Install the software that you think that will perform better.In my opinion one of the best possible setups is: Nginx, MariaDB, PhpFPM (5.6.x), Zend opcache, Memcache(will help more with IPB4), Sphinx.

9)Convert all tables in your database to Innodb engine.

10)Optimize all of the above:

For Nginx basic values to adjust are:
 

worker_processes    <---Set it to 1/3 of your total cpu cores

worker_connections

Don't add at worker processes all your cpu cores!

For phpFPM the dynamic is a good option to use (you wil need a few extra ram) and basic values to adjust are:

pm.max_children    <----- Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
pm.start_servers
pm.min_spare_servers
pm.max_spare_servers

For huge forums use multiple fpm pools (add 5 extra for example) as it is like internal load balancing for php :)

For MariaDB you should check all values in my.cnf file and use a script like:

https://github.com/major/MySQLTuner-perl

and

https://launchpad.net/mysql-tuning-primer

to get an idea of what values you need to adjust....

A basic one is:

InnoDB buffer pool / data size:

So keep an eye on it to have buffer pool bigger than data size.

You can adjust also the temp path to use tmpfs a it is much faster.

Also be careful with values:

join_buffer_size
read_buffer_size
sort_buffer_size

Increasing them will NOT help mysql performance at all.

For Zend opcache just change the:

opcache.memory_consumption

You can use a zend opcache admin panel to check how much memory you are using and how much you must increase it..

For Memcache you can do the same with this value:

MEMSIZE

You can use memcache also for users php sessions as it is faster in ram than using files :)

For Sphinx (use it only if you have a lot posts or topics (more than 500.000) and adjust in the config file the:

mem_limit

11)Don't use a lot of addons/plugins just use only the ones that you really need and remove the rest.

12)You may want to use pagespeed also but it may be a trouble to setup it and find the files that you must exclude for it and that may break some css/java files.(Please test it only if you think that you are able to handle it).

13)For security reasons i recommend you to install CSF Firewall.

14)Disallow running php code from /uploads folder.

15)Password protect your admin folder path.

16)Don't forget the golden rule before trying anything of the above to get a FULL BACKUP of your files data and your databases !

 

That's all :)

I hope that it will help you and enjoy your forums :)

Have a nice day.

 

  • 1 month later...
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...