My Forum is terribly slow compared to vbulletin

PetForums

Member
Hi All, I moved my forum from vbulletin 3.7 a couple of days ago to xenforo, and since the move the forum has been running ok one minute and then going really slow to the point of not being able to open any pages.

The forum was really quick on vbulletin. Does anyone know if using xenforo will use more server resources and typically be slower than vbulletin?

My server spec is pretty powerful, so below :

12 Core: 2 x Intel Xeon E5-2430v2 (15M Cache, 2.50 GHz)
Memory 96GB DDR3
Hard Disk Configuration 4 x 4TB SSHD

I usuable have around 100 members and about 500 guests online at any one time


My server admin person said its the query below which is causing problems, I would be greatful if someone could help as my forum is pretty much unusable for parts of the day.


"SELECT post.*
,
user.*, IF(user.username IS NULL, post.username, user.username) AS username,
user_profile.*,
user_privacy.*,
session_activity.view_date AS last_view_date,
liked_content.like_date
FROM xf_post AS post

LEFT JOIN xf_user AS user ON
(user.user_id = post.user_id)
LEFT JOIN xf_user_profile AS user_profile ON
(user_profile.user_id = post.user_id)
LEFT JOIN xf_user_privacy AS user_privacy ON
(user_privacy.user_id = post.user_id)
LEFT JOIN xf_session_activity AS session_activity ON
(post.user_id > 0 AND session_activity.user_id = post.user_id)
LEFT JOIN xf_liked_content AS liked_content
ON (liked_content.content_type = 'post'
AND liked_content.content_id = post.post_id
AND liked_content.like_user_id = 1306629)
WHERE post.thread_id = '397161'
AND (post.position >= 90 AND post.position < 100)
AND (post.message_state IN ('visible') OR (post.message_state = 'moderated' AND post.user_id = 1306629))
ORDER BY post.position ASC, post.post_date ASC "
 
When I add the following yo my config file and refresh my forum, all it displays is the text "An unexpected error occured":

$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
'compression' => false,
'servers' => array(
array(
// your memcached server IP /address
'host' => 'localhost',

// memcached port
'port' => 11211,
)
)
);
 
If you're using CentOS, Debian, Ubuntu, or similar, I'll gladly optimize your server for you. Free of charge.
 
It's unclear why your server admin is pointing at that query. What steps has he taken to identify that as the problem?

I strongly suspect your MySQL server hasn't had any InnoDB tuning (which isn't the table type you would have been using). Please see:

http://www.percona.com/blog/2013/09/20/innodb-performance-optimization-basics-updated/
https://tools.percona.com/wizard

I know my server admin has done some InnoDB tuning but I wil lmake sure they look further in to this now.

If you're using CentOS, Debian, Ubuntu, or similar, I'll gladly optimize your server for you. Free of charge.

Thanks for your offer, I will get back to you possibly on this. Thanks
 
Should all xenforo tables be innodb ? I know my admin changed the sessions table to innodb as it was causing problems with locking.
 
Not necessarily all, but most. The only time you wouldn't have the "correct" table configuration is if you didn't have InnoDB enabled when XF was installed and that's fairly uncommon.

You can generally flip table types about if you understand why you're making the change (locking is a reasonable example). Though in the session example, you'd do better getting Memcached enabled and having the sessions go in there.
 
I have just managed to get memcached setup without giving me an error, by adding the following to the config.php file, but as soon as I enabled it, I could no longer login to the forum, everytime I logged in it was just redisplaying the forum as though I was not logged in. Any advice ?

$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
'compression' => false,
'servers' => array(
array(
// your memcached server IP /address
'host' => 'localhost',

// memcached port
'port' => 11211,
)
)
);
 
Also, as soon as I remove the back end cache settings below, it then lets me back in, so it must be something to do with Memcached ?

$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
'compression' => false,
'servers' => array(
array(
// your memcached server IP /address
'host' => 'localhost',

// memcached port
'port' => 11211,
)
)
);
 
Hi, has anyone got any ideas on this problem? I'll speak to my server admin and see if he knows, but I thought it could be a setting I need to change with xenforo?
 
Added to my favorites to take a drive later with memcached configured.
but now is flying really very fast from here (Hong Kong)
 
Are you sure memcached is working?

This is what I use in my config.php (but I use Libmemcached)

Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_1';

$config['cache'] = array(
    'enabled' => true,
    'frontend' => 'Core',
    'frontendOptions' => array(
            'caching' => true,
            'automatic_serialization' => true,
//$config['cache']['cacheSessions'] = true;
            'cache_id_prefix' => 'xf_1',
//            'lifetime' => 18000
    )
);
$config['cache']['backend']='Libmemcached';
$config['cache']['backendOptions']=array(
        'compression'=>false,
        'servers' => array(
                array(
                        'host'=>'127.0.0.1',
                        'port'=>'11211',
                        'persistent' => 'true'
                )
      )
);

Check phpinfo to see what you have installed.
You might have to change this rule
Code:
$config['cache']['backend']='Libmemcached';
to
Code:
$config['cache']['backend']='Memcached';
 
Back
Top Bottom