June 19, 2013

Post: Should you have your swap file enabled while running MySQL ?

… but never never really used. These would be first valid candidates to swap out. Second if you have swap file you get a… behavior and swap buffer space out even with /proc/sys/vm/swappiness =0. You can lock MySQL in memory by using –memlock option… you. Myself I tend to keep swap enabled on MySQL server but of course ensure there is not swapping happening (si/so columns in…

Post: Why Swapping is bad for MySQL Performance ?

using more memory for cache and pushing application to the swap. This causes swappingMySQL makes a special effort to avoid (delay) IO. If it happens to go to swapnot in the swap file. The bottom line: You should configure system so no swapping activity is going on during normal operations. The swap

Post: Aligning IO on a hard disk RAID – the Theory

… when creating partitions (see below), you don’t need to use –dataalignmentoffset, otherwise with this option you can shift the beginning… Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/sda3 1738 145649 1155959808 83 Linux Partition 3 does not end… Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/sda3 27920384 2339839999 1155959808 83 Linux Partition 3 does not end…

Post: Is disk Everything for MySQL Performance ?

MySQL UC2008 Scalability Panel ? Indeed disks MAY be the most important part in your system performance or it may not…well because this makes it very easy to use LVM for backups while assuming you have BBU… RAID volume was trashed. Regarding SWAP – I tend to have it but not optimize for it, putting it…

Post: PHP Large result sets and summary tables.

… was swapping development server which had just 4GB of Ram (and plenty of swap space) like crazy. Why ? Because by default mysql_query uses mysql… management which does not apply to MySQL result set. OK there is “easy” fix for this problem, you can use mysql_unbuffered_query instead… reach similar behavior. This call users underlying mysql_use_result API call which does not store all result set in memory but instead…

Post: MySQL Installation and upgrade scripts.

… to get back you just swap binaries to the old version. I think it was great. In MySQL 4.1 and later… write not about MySQL Server upgrade process but rather about my experience with RPM scripts used during install and upgrade. These are obviously not… if you use RHEL4 in default configuration (which is having SELinux enabled) upgrading RedHat RPM to MySQL “RedHat” RPM will not allow MySQL to…

Post: Filling the tmp partition with persistent connections

… it is not really empty: # df -h [...] /dev/loop0 985M 961M 0 100% /tmp Lets see which files has MySQL opened: # lsof… can go to swap, which would defeat the performance improvement as it uses disk I/O anyway. Ramfs will not swap, and also ramfs… system in the end. Conclusion MySQL can creates temporary files even thought those temporary files are not visible on the EXPLAIN or…

Post: 10+ Ways to Crash or Overload MySQL

… many cases you can use result overload to make MySQL to consume so much memory so it will swap badly until it runs… hosting companies offering MySQL access. Sure they do and many of them are lucky having users using MySQL lightly and not trying to crash… detect and restrict abusers. This is not to mention many Virtual Hosting companies use old MySQL versions which typically have more issues. P…

Post: Are PHP persistent connections evil ?

… other problem with persistent connections is using too many MySQL server connections. Some people simply do not realize you can increase max_connections… well out of memory and get crash or have MySQL starting to swap aggressively. This is where connection pooling would be extremely… read-only page and everything on your site uses same charset and does not use per session variables in some tricky way it…

Post: Using MyISAM in production

… of items you need to keep into account while using MyISAM tables. Recovery. MySQL was running stable for us, giving us false…_size and MySQL could crash or go swapping. Second – table will be locked while repair is going. If this is frequently used table… I think MyISAM tables are good to be used for. This list is not inclusive and every system has its own risk…