Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

closed as off-topic by MadHatter, EEAA, Ward, Falcon Momot, Dave M Nov 11 '13 at 1:02

  • This question does not appear to be about professional server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

up vote 0 down vote accepted

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.

share|improve this answer
    
Nice words but can you please suggest a specific options for 4G.B RAM 2 G.B InnoDB database size –  adnan Nov 9 '13 at 7:19
    
just download the 5.5 tarball then, and use the huge my.cnf example... you will be fine with that –  nandoP Nov 9 '13 at 7:24
    
how can i download it & also i need to options for 4 G.B not for 512M –  adnan Nov 9 '13 at 7:48

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?

share|improve this answer
    
Unfortunately my experience is stopped after my.cnf i don't have any idea about memcache, cookies & filestamps ...etc –  adnan Nov 9 '13 at 8:23
    
what issues you really got, is the site to slow? Install: addons.mozilla.org/de/firefox/addon/firebug developers.google.com/speed/docs/insights/using_firefox 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 9 '13 at 9: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 9 '13 at 9:33

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

share|improve this answer

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.

share|improve this answer
    
i tried to use mysql tuner from 3 months ago & do all suggesstions from it with no luck –  adnan Nov 9 '13 at 6:53
    
Then if that’s case I am not sure what is wrong. Maybe you should consider caching more content on your server. –  JakeGould Nov 9 '13 at 6:56
    
does you mean increase query_cache_size ? –  adnan Nov 9 '13 at 6:57
    
No, I mean reprogramming your WordPress. If MySQL tuning doesn’t help something else is wrong. –  JakeGould Nov 9 '13 at 7:01
    
I tried before doing some changes in WordPress but it is not solved the problem so i think that the better way is the server or MySQL itself –  adnan Nov 9 '13 at 7:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.