Jump to content

Optimizing your server for IPS 4.1?


OctoDev

Recommended Posts

Right, so here is my server specs:

32GB Ram
Intel Xeon E3 1245v2
3 x 120 GB SSD
1Gbps Internet Speed

I am using nginx, zend op cache & suhosin. I also have memcached installed, so I use zend op cache & memcached. I am using MariaDB.

However, i am not too happy with the load time of the index of my forum. It takes anywhere between 350ms - 500ms to load, what could I do to improve this?

 

I want to get down to at least 200ms, if possible even. 

 

 

 

MariaDB Config:

[mysqld]
local-infile=0
ignore-db-dir=lost+found
#character-set-server=utf8
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

#bind-address=127.0.0.1
# optimized my.cnf for MariaDB 5.5.x
# by eva2000
# vbtechsupport.com

tmpdir=/home/mysqltmp

innodb=ON
#skip-federated
#skip-pbxt
#skip-pbxt_statistics
#skip-archive
#skip-name-resolve
#old_passwords
back_log = 75
max_connections = 300
key_buffer_size = 32M
myisam_sort_buffer_size = 32M
myisam_max_sort_file_size = 2048M
join_buffer_size = 128K
read_buffer_size = 128K
sort_buffer_size = 256K
table_definition_cache = 4096
table_open_cache = 2048
thread_cache_size = 128
wait_timeout = 120
connect_timeout = 10
tmp_table_size = 32M
max_heap_table_size = 32M
max_allowed_packet = 32M
max_seeks_for_key = 1000
group_concat_max_len = 1024
max_length_for_sort_data = 1024
net_buffer_length = 16384
max_connect_errors = 100000
concurrent_insert = 2
read_rnd_buffer_size = 256K
bulk_insert_buffer_size = 8M
query_cache_limit = 1M
query_cache_size = 1000M
query_cache_type = 1
query_cache_min_res_unit = 2K
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = InnoDB

log_warnings=1
slow_query_log=0
long_query_time=1
slow_query_log_file=/var/lib/mysql/slowq.log
log-error=/var/log/mysqld.log

# innodb settings
innodb_large_prefix=1
innodb_purge_threads=1
innodb_file_format = Barracuda
innodb_file_per_table = 1
innodb_open_files = 1000
innodb_data_file_path= ibdata1:10M:autoextend
innodb_buffer_pool_size = 48M

## https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_buffer_pool_instances
#innodb_buffer_pool_instances=2

innodb_log_files_in_group = 2
innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_thread_concurrency = 0
innodb_lock_wait_timeout=50
innodb_flush_method = O_DIRECT
innodb_support_xa=1

# 200 * # DISKS
innodb_io_capacity = 100
innodb_read_io_threads = 2
innodb_write_io_threads = 2

# mariadb settings
[mariadb]
#thread-handling = pool-of-threads
#thread-pool-size= 20
#mysql --port=3307 --protocol=tcp
#extra-port=3307
#extra-max-connections=1

userstat = 0
key_cache_segments = 1
aria_group_commit = none
aria_group_commit_interval = 0
aria_log_file_size = 32M
aria_log_purge_type = immediate 
aria_pagecache_buffer_size = 8M
aria_sort_buffer_size = 8M

[mariadb-5.5]
#ignore_db_dirs=
query_cache_strip_comments=0

innodb_read_ahead = linear
innodb_adaptive_flushing_method = estimate
innodb_flush_neighbor_pages = 1
innodb_stats_update_need_lock = 0
innodb_log_block_size = 512

log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk

[mysqld_safe] 
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
#nice = -5
open-files-limit = 8192

[mysqldump]
quick
max_allowed_packet = 32M

[myisamchk] 
tmpdir=/home/mysqltmp
key_buffer = 32M 
sort_buffer = 16M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy]
interactive-timeout

[mariadb-10.0]
# 2 variables needed to switch from XtraDB to InnoDB plugins
#plugin-load=ha_innodb
#ignore_builtin_innodb

## MariaDB 10 only save and restore buffer pool pages
## warm up InnoDB buffer pool on server restarts
innodb_buffer_pool_dump_at_shutdown=1
innodb_buffer_pool_load_at_startup=1
innodb_buffer_pool_populate=0
## Disabled settings
performance_schema=OFF
innodb_stats_on_metadata=OFF
innodb_sort_buffer_size=2M
innodb_online_alter_log_max_size=128M
query_cache_strip_comments=0
log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk

 

Link to comment
Share on other sites

20 minutes ago, Jimmy Gavekort said:

32GB Ram
Intel Xeon E3 1245v2
3 x 120 GB SSD
1Gbps Internet Speed

I am using nginx, zend op cache & suhosin. I also have memcached installed, so I use zend op cache & memcached. I am using MariaDB.

(w00t) whouahou !

I would like to have the same configuration! :thumbsup:

Link to comment
Share on other sites

12 minutes ago, homeofeconomy said:

Do you have performance stats on what makes up the total time to serve?  In other words, how much of that is DB time and how much is Webserver time?

I don't know how I could check such to be honest with you.

Talked with someone else, they said the page on first page load contains 3MB.. That's a lot, but i guess that's just IPS..? Not sure if that has anything to do with the 'first' document load, since thats mainly PHP/DB.

 

Would think there would be a setting in IPS, to show serve time etc..?

Link to comment
Share on other sites

Just now, Machsterdaemon said:

wow

This is very big query cache size.

I heard.. The bigger, the better..? Should i lower it? 

By the way, i also have Pagespeed - but not enabled for this domain.. any configuration I should use, or should I use it at all? I am really desperate to lower it lol, more than one second is bad.. 

Link to comment
Share on other sites

1 minute ago, Machsterdaemon said:

I don't know what your server is using this for and what your needs are, but I would think that the query cache size should be kept low as possible.

1.) IPS Forum
2.) A license system.

What do you suggest me to change it to? 

 

It use to be 16M lol

Link to comment
Share on other sites

35 minutes ago, Jimmy Gavekort said:

Here is my main problem that is annoying me, the background picture is reloading each page: 

GIF VIDEO: http://i.imgur.com/Uuoot5q.gifv

However on hes site, it does not. Like, what's the difference? I am using hes theme, hes site looks a lot smoother when browsing (no images disapearing/coming back).

Fine for me, the images cache properly and return a 304 NOT MODIFIED status, seems that your browser might have caching disabled.

Link to comment
Share on other sites

1 hour ago, Jimmy Gavekort said:

1.) IPS Forum
2.) A license system.

What do you suggest me to change it to? 

 

It use to be 16M lol

I don't know how well the query cache is performing on your server so I can't suggest a lower value. But normally I would just have it disabled on my server or make a decent size for it, what I really needed, or just start with low values on my server like 8 MB, and monitor it actively.

This is the status for Qcache on my own server (personal use only), the cache size is just 0 by default but is on. I used to monitor it's status using SHOW STATUS and mysqlreport tool when I was using it.

MariaDB [(none)]> SHOW STATUS LIKE 'Qcache%';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| Qcache_free_blocks      | 0     |
| Qcache_free_memory      | 0     |
| Qcache_hits             | 0     |
| Qcache_inserts          | 0     |
| Qcache_lowmem_prunes    | 0     |
| Qcache_not_cached       | 0     |
| Qcache_queries_in_cache | 0     |
| Qcache_total_blocks     | 0     |
+-------------------------+-------+
8 rows in set (0.00 sec)

 

Link to comment
Share on other sites

21 minutes ago, Ahmad E. said:

Fine for me, the images cache properly and return a 304 NOT MODIFIED status, seems that your browser might have caching disabled.

For me it didn't cache when I refreshed the index but it did cache when I loaded another page then when I went back to the index it was cached.

Do you have browser caching enabled?

Link to comment
Share on other sites

1 hour ago, Jimmy Gavekort said:

I heard.. The bigger, the better..? Should i lower it? 

By the way, i also have Pagespeed - but not enabled for this domain.. any configuration I should use, or should I use it at all? I am really desperate to lower it lol, more than one second is bad.. 

You should even disable it. Not everything bigger is better, or anyone could be a master. 

Your db is using myisam or innodb? 

Link to comment
Share on other sites

2 hours ago, Bluto said:

You do know that eva2000 has templates for certain sized servers in one of the directories.

On my end, your site loads very fast.

not that i've seen?

 

on another end, now my server went poop :) mysql + php crashed, reinstalled php but mysql stuck and wont start

Link to comment
Share on other sites

3 hours ago, Jimmy Gavekort said:

not that i've seen?

 

on another end, now my server went poop :) mysql + php crashed, reinstalled php but mysql stuck and wont start

eva2000 has pre-made my.cnf files for various server sizes.

https://github.com/centminmod/centminmod/tree/123.09beta01/config/mysql

Try copying over the minimal my.cnf file or removing the my.cnf file all together, start mysql server.  Once it starts, stop it and put your old my.cnf file back.

Link to comment
Share on other sites

On 1/21/2016 at 3:01 AM, EmpireKickAss said:

you are using the same theme of carbon like I am. Unfortunately doesn't work as well on windows phone same test website.

my website is loading with heavy content over 5mb for the forum.

yeah pretty heavy theme huh? > 1mb is pretty bad.. 

Link to comment
Share on other sites

On 1/21/2016 at 3:53 AM, Bluto said:

eva2000 has pre-made my.cnf files for various server sizes.

https://github.com/centminmod/centminmod/tree/123.09beta01/config/mysql

Try copying over the minimal my.cnf file or removing the my.cnf file all together, start mysql server.  Once it starts, stop it and put your old my.cnf file back.

used 32G one, not seeing any difference.. but might be more optimized, idk :)

Link to comment
Share on other sites

20 minutes ago, Jimmy Gavekort said:

used 32G one, not seeing any difference.. but might be more optimized, idk :)

One thing I noticed from one of your last posts, is that your server includes SATA drives.  Honestly, I think your site is pretty fast now, but if you want those MS increases you might want to consider a host using SSD drives.  I'm a big OVH fan - have never had a problem in the 3 years I've been using them.  I didn't even know that SYS existed.  I was excited about picking up a extra server on SYS because of those low prices, but then I saw the SATA drives (I think there is one or two with SSD drives but they are sold out) which I never use.

If I were you I'd also make a post on the Centminmod forum and see what eva2000 has to say.  He's always looking to tweak things based on user feedback.  :)

Link to comment
Share on other sites

1 hour ago, Bluto said:

One thing I noticed from one of your last posts, is that your server includes SATA drives.  Honestly, I think your site is pretty fast now, but if you want those MS increases you might want to consider a host using SSD drives.  I'm a big OVH fan - have never had a problem in the 3 years I've been using them.  I didn't even know that SYS existed.  I was excited about picking up a extra server on SYS because of those low prices, but then I saw the SATA drives (I think there is one or two with SSD drives but they are sold out) which I never use.

If I were you I'd also make a post on the Centminmod forum and see what eva2000 has to say.  He's always looking to tweak things based on user feedback.  :)

 

On 20.1.2016 at 6:52 PM, Jimmy Gavekort said:

Right, so here is my server specs:

32GB Ram
Intel Xeon E3 1245v2
3 x 120 GB SSD
1Gbps Internet Speed

Also he has made a post on centminmod; https://community.centminmod.com/threads/optimizing-my-install.5801/

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