1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

My Forum is terribly slow compared to vbulletin

Discussion in 'Server Configuration and Hosting' started by PetForums, Apr 24, 2015.

  1. PetForums

    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 "
     
  2. Fred.

    Fred. Well-Known Member

  3. PetForums

    PetForums Member

    No, I havent done this, but will look in to it now.


    Thanks
     
  4. PetForums

    PetForums Member

    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,
    )
    )
    );
     
  5. Solidus

    Solidus Well-Known Member

    Is memcached installed?
     
  6. Mike

    Mike XenForo Developer Staff Member

    Yoskaldyr likes this.
  7. Solidus

    Solidus Well-Known Member

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

    PetForums Member

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

    Thanks for your offer, I will get back to you possibly on this. Thanks
     
  9. RoldanLT

    RoldanLT Well-Known Member

    And make sure your XenForo Database table is using Innodb not MyIsam.
     
  10. PetForums

    PetForums Member

    Should all xenforo tables be innodb ? I know my admin changed the sessions table to innodb as it was causing problems with locking.
     
  11. Mike

    Mike XenForo Developer Staff Member

    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.
     
  12. PetForums

    PetForums Member

    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,
    )
    )
    );
     
  13. PetForums

    PetForums Member

    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,
    )
    )
    );
     
  14. PetForums

    PetForums Member

    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?
     
  15. rafass

    rafass Well-Known Member

  16. PetForums

    PetForums Member

    Yes that's the one, it is working fast at the moment, my server admin changed some innodb settings last night. I would still like to try and get memcached working though.
     
    rafass likes this.
  17. rafass

    rafass Well-Known Member

    Added to my favorites to take a drive later with memcached configured.
    but now is flying really very fast from here (Hong Kong)
     
  18. Fred.

    Fred. Well-Known Member

    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';
     
  19. RoldanLT

    RoldanLT Well-Known Member

    Fred. likes this.
  20. Fred.

    Fred. Well-Known Member

    Oh, ok.
    Thanks RoldanLT (y)
    I didn't know, I changed that.
     

Share This Page