-4

My website using wordpress with more than 150K posts & using auto posts publish feature with more than 2K daily posts I need to configure my.cnf settings to speed up my website actually the website speed is good but i have a problem with facebook sharing when I trying to share some link in facebook the link appears as this image

http://elnhrda.com/facelink.jpg

So I need to speed up my website by configure my.cnf

I have VPS 4G.B RAM 300 HDD CENTOS6 x86_64 processor Intel Dual Xeon L5420 (8 x 2.5 GHz)

this is my current my.cnf

[mysqld]
query_cache_size=512M
skip-name-resolve
innodb_file_per_table=1
query_cache_limit=32M

any suggestions may be help

Giacomo1968
  • 3,542
  • 27
  • 38
adnan
  • 101
  • 1
  • 4

4 Answers4

1

There’s really no way to generically say that you should increase this, decrease that & adjust another. The best way to tune MySQL is via MySQL tuning primer which is a nice shell script that can analyze your MySQL usage & recommend adjustments.

Giacomo1968
  • 3,542
  • 27
  • 38
0

each sql usage pattern is typically different, and there are no hard and fast rules other than tweek, loadtest mimicing live querys, repeat

however, in addition to the mysql tuning primer, there is also the mysqltuner tool, and in the mysql souce tarball (5.6 no longer has this, 5.5 and below only), there are small, medium, large, and huge default my.cnf example files for different server sizes. keep in mind this is just a base point to start from, but most likely, they will run just fine for you without altering...

here is the large my.cnf example mysql publishes:

~/Downloads/mysql-5.5.34 $ head -4 support-files/my-large.cnf.sh
# Example MySQL config file for large systems.
#
# This is for a large system with memory = 512M where the system runs mainly
# MySQL.

nandoP
  • 2,021
  • 14
  • 15
0

Are you sure the database is limiting? Use the slow query log to analyze the slowest queries. Than you can use explain on those queries to see what MySQL does. Maybe you can create indexes to speedup specific tables.

There are maybe other reasons for performance issues. Have you tried to use caching technologies like memcached and caching the full pages? Do you have some rules for not serving cookies for image/css/js files, do you have set caching-filestamps for that files?

Giacomo1968
  • 3,542
  • 27
  • 38
torsten
  • 61
  • 1
  • 1
  • 6
  • Unfortunately my experience is stopped after my.cnf i don't have any idea about memcache, cookies & filestamps ...etc – adnan Nov 09 '13 at 08:23
  • what issues you really got, is the site to slow? Install: https://addons.mozilla.org/de/firefox/addon/firebug/ https://developers.google.com/speed/docs/insights/using_firefox https://addons.mozilla.org/de/firefox/addon/yslow/ go to your page, hit F12 go to the tab page_speed/yslow and hit STRG+F5, so you can see how "fast" your webpage is... post the result so we might help you – torsten Nov 09 '13 at 09:18
  • Iam already using Pingdom, GTMetrix, Loads.in firebug for testing the speed the site speed is not bad but my problem is with facebook. it usually can't grab the title, img, content...etc when i increased the site speed facebook no problems, so i trying to increase the speed – adnan Nov 09 '13 at 09:33
0

I can advice you mysqltuner perl script (https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl), it's suitable for tuning, btw you should tune not only mysql if it's possible, check out apache, php, other options

user973254
  • 151
  • 5