Jump to content

Slow Site


Recommended Posts

We are in a time of year when we will see a big increase in traffic for a few weeks. Even in performance mode the site is lagging too much. Any help with the issues?

Note I have only 438 people online at the time of this data being captured

 

Here is what the IP.Board Diagnostics looks like

P.Board Version
v3.4.7 (ID:34013)
MYSQL Version
MYSQL 5.1.58
PHP Version
5.3.29 (apache2handler) ( PHP INFO )
Disabled PHP Functions
No Information
Loaded Extensions
Core, PDO, Phar, Reflection, SPL, SimpleXML, apache2handler, bz2, calendar, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, ionCube Loader, json, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, pdo_mysql, pdo_sqlite, session, shmop, sockets, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib
Safe Mode
OFF
System Software
Linux indianamat 2.6.18-400.1.1.el5 #1 SMP Thu Dec 18 00:59:53 EST 2014 x86_64
Current Server Load
51.59
Total Server Memory
15040 MB
Available Server Memory
6327 MB

 

System Processes

top - 18:36:49 up 2 days,  8:03,  0 users,  load average: 72.16, 74.28, 75.10
Tasks: 237 total,  21 running, 216 sleeping,   0 stopped,   0 zombie
Cpu(s): 33.8%us,  2.2%sy,  0.0%ni, 63.0%id,  0.6%wa,  0.1%hi,  0.3%si,  0.0%st
Mem:  15401884k total,  8921284k used,  6480600k free,   194768k buffers
Swap:  1048568k total,        0k used,  1048568k free,  1853660k cached

 

 

Link to comment
Share on other sites

Hi IndianaJoe :)

In your case i would move from Apache to Nginx, replace the old Mysql that you use with MariaDB 10.0.16, use php-fpm and opcode caching Zendopcache with Memcache :)

Also i recommend you to use Centos 6.6 64Bit .

If you want to try to get better performance with your current setup without changing settings then share more info with us so we may be able to help you:

Server specifications

Apache settings

Php settings

Mysql my.cnf settings

 

Link to comment
Share on other sites

Here is the Mysql my.cnf settings

 

 

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# To enable the InnoDB Plugin, uncomment the 2 next lines
#ignore-builtin-innodb
#plugin-load=innodb=ha_innodb_plugin.so

# To enable InnoDB-related INFORMATION_SCHEMA tables
# Join the following options to above directive
  ;innodb_trx=ha_innodb_plugin.so
  ;innodb_locks=ha_innodb_plugin.so
  ;innodb_cmp=ha_innodb_plugin.so
  ;innodb_cmp_reset=ha_innodb_plugin.so
  ;innodb_cmpmem=ha_innodb_plugin.so
  ;innodb_cmpmem_reset=ha_innodb_plugin.so

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Link to comment
Share on other sites

You have Mysql running with the default values. You need to really optimize it.

Can you run mysqltuner and post here the result?

I also recommend you to install a Opcode Cache,

 

If you do not feel very confortable in installing this kind of things, like apache, nginx, mysql etc etc, i recommend you to install VestaCP. It will install Apache with NGINX as Reverse Proxy, PHP 5.4, Mysql 5.5 and a firewall. The setting are by default good optimized(unless mysql).
With this setup you just need to unnistall mysql 5.5 and install Mariadb 10. Its very easy.

 

PS: I never seen a load average so high as yours...

 load average: 72.16, 74.28, 75.10

Link to comment
Share on other sites

Here is an honest option, you can change all the configurations that you want, optimize until the end of the earth, at the end of the day, you will still be suffering from a high load due to lack of processor power with your vps.

With a site your size and traffic, you simply need more horse power!  

I would guess to say this vps is very restricted on processor access/cores etc and that is your primary issue at hand.  Re-configuring your server is not going to solve that issue though.   :)

 

 

 

Link to comment
Share on other sites

Here is an honest option, you can change all the configurations that you want, optimize until the end of the earth, at the end of the day, you will still be suffering from a high load due to lack of processor power with your vps.

With a site your size and traffic, you simply need more horse power!  

I would guess to say this vps is very restricted on processor access/cores etc and that is your primary issue at hand.  Re-configuring your server is not going to solve that issue though.   :)

 

 

 

​Thanks for the honesty. Basically what you are saying is IP is a resource hog as I never had issues using Wordpress and SMF for my forum.

Are there any optimizations that I can do with SQL, Apache, PHP, or even on the board to help with the site issues for the next few weeks(my most traffic weeks of the year) until I can look into upgrading my server?

Link to comment
Share on other sites

​Thanks for the honesty. Basically what you are saying is IP is a resource hog as I never had issues using Wordpress and SMF for my forum.

Are there any optimizations that I can do with SQL, Apache, PHP, or even on the board to help with the site issues for the next few weeks(my most traffic weeks of the year) until I can look into upgrading my server?

​Put here your Mysqltuner and i'll give a better my.cnf than you have

You could do a lot more, but a good optimized my.cnf can alleviate your forum for the next weeks.

Link to comment
Share on other sites

sorry for the offtopic:

Current Server Load
51.59
Total Server Memory
15040 MB
Available Server Memory
6327 MB

 

 

System Processes

top - 18:36:49 up 2 days,  8:03,  0 users,  load average: 72.16, 74.28, 75.10
Tasks: 237 total,  21 running, 216 sleeping,   0 stopped,   0 zombie
Cpu(s): 33.8%us,  2.2%sy,  0.0%ni, 63.0%id,  0.6%wa,  0.1%hi,  0.3%si,  0.0%st
Mem:  15401884k total,  8921284k used,  6480600k free,   194768k buffers
Swap:  1048568k total,        0k used,  1048568k free,  1853660k cached

I`m on a dedicated Server from a hosting Company, but i dont have this data. Any chance, that i can see this, too? Did i miss a setting?

Link to comment
Share on other sites

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz
stepping        : 7
cpu MHz         : 1861.914
cache size      : 4096 KB

Here is my cpu information

I'll get Mysqltuner running either tonight or tomorrow morning and post the information.

Thanks a bunch

Link to comment
Share on other sites

You have a single core core of a quad core processor, running at 1.86GHZ, that processor is also 9 years old, it is your weak link here without a doubt as suggested prior. I'm shocked you were able to get to 400 users online period to be honest. 

You can tune all day, it will help for sure, however it won't get you past the fact that you are using a very small portion of a 9 year old processor that is very poor even in 06 when it was released. 

As far as our software compared to others, they will all vary depending on the features available and also the traffic on the site as well, it's not really apples to apples comparing word press to a forum software though. 

 

 

 

Link to comment
Share on other sites

Here is the mysqltuner result

 

>>  MySQLTuner 1.4.0 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
[!!] Successfully authenticated with no password - SECURITY RISK!
[OK] Currently running supported MySQL version 5.1.58
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV +FEDERATED +InnoDB +MRG_MYISAM
[!!] InnoDB is enabled but isn't being used
[OK] Total fragmented tables: 0

-------- Security Recommendations  -------------------------------------------
ERROR 1142 (42000) at line 1: SELECT command denied to user ''@'localhost' for table 'user'
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 2d 23h 47m 55s (9M q [37.109 qps], 375K conn, TX: 480B, RX: 2B)
[--] Reads / Writes: 81% / 19%
[--] Total buffers: 34.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 449.2M (2% of installed RAM)
[OK] Slow queries: 0% (1K/9M)
[!!] Highest connection usage: 100%  (152/151)
[!!] Cannot calculate MyISAM index size - re-run script as root user
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (42 temp sorts / 474K sorts)
[OK] Temporary tables created on disk: 25% (62K on disk / 250K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (64 open / 201K opened)
[OK] Open file limit used: 12% (123/1K)
[OK] Table locks acquired immediately: 99% (12M immediate / 12M locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
    Add skip-innodb to MySQL configuration to disable InnoDB
    Enable the slow query log to troubleshoot bad queries
    Reduce or eliminate persistent connections to reduce connection usage
    Set thread_cache_size to 4 as a starting value
    Increase table_open_cache gradually to avoid file descriptor limits
    Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C
Variables to adjust:
    max_connections (> 151)
    wait_timeout (< 28800)
    interactive_timeout (< 28800)
    query_cache_size (>= 8M)
    thread_cache_size (start at 4)
    table_open_cache (> 64)

 

Link to comment
Share on other sites

[--] Total buffers: 34.0M global + 2.7M per thread (151 max threads)

2,7M per thread is very high!

 

You can try to add/edit the below values to your my.cnf :

max_connections = 250
wait_timeout = 120
query_cache_limit = 512K
query_cache_size = 64M
query_cache_type = 1
table_open_cache = 1024
join_buffer_size = 64K
read_buffer_size = 64K
sort_buffer_size = 128K
read_rnd_buffer_size = 256K
thread_cache_size = 256

Restart Mysql and wait 2 days and then let us know how it goes.

You should install an Opcode cacher like Zend Opcache + Memcache or if it is more easy for you you can try APC :)

But the best option for you as already advice you Rhett is to get a better server....

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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