Ning Ma blog

my technology tips

January, 2014

easy way to remove iptables rules

here is easy way to remove iptables rules


remove rule by num

Varnish separate cache by user agent

under the sub vcl_rev add this code

Set up a different hash for mobile

MySQL’s query cache vs memcached

I did some research about MySQL’s query cache. Some people said it will speed up page load times by 5-15%. Query cache is used to cache SELECT results and later return them without actual executing the same query once again. Having the query cache enabled may result in significant speed improvements, But if tables change […]

varnish beresp.ttl beresp.grac different


cache the file 1 day req.grace

after 1 day, if Apache Goes Down, still cache another 6 hours

check mysql tem files and tables

Try to execute show processlist;, maybe there are some long lasting threads that were not killed for some reason. Similarly execute SHOW SESSION STATUS LIKE ‘Created%’; to check if mysql hasn’t created to many temporary tables. Server restart automatically closes all open temp tables and kills threads, so the application might run quicker.

Move the default MySQL data directory with SELinux/Centos/RHEL 6.2/Fedora 16

This is a short article that explains how you change the default MySQL data directory and adjust SELinux to account for the changes. The article assumes that you’re running either RHEL, CentOS, Scientific Linux or Fedora with SELinux enabled. This works with the most recent EL (6.2) version. We’ll be doing this in the following […]