Posts

Showing posts from August, 2013

MySQL: learning how to recover your InnoDB from corruption

This is wonderful post to learn how to recover your data from Peter Zaitsev, http://www.mysqlperformanceblog.com/2008/07/04/recovering-innodb-table-corruption/ This means that in every BTREE context, there's always a page and by using BTREE data structure, you have records stored in there as part of the page and that means you can recover your data from its tablespace.

MySQL: Like this blog from Miguel. A must read

In case you're experiencing your ibdata1 is getting bigger, read this wonderful post by my colleague Miguel at Percona. http://www.mysqlperformanceblog.com/2013/08/20/why-is-the-ibdata1-file-continuously-growing-in-mysql/

Great info to learn on determining IOPS required for Horde

Determining disk drives if you know the IOPS required If you can make an estimate of how many I/O's Per Second (IOPS) you need you can determine how many disks you'll need as RAID10 and how many disks you'll need as RAID5. Generally, a single disk drive can do this many IOPS per disk: 15k rpm: 180-210 IOPS 10k rpm: 130-150 IOPS 7200 rpm: 80-100 IOPS 5400 rpm: 50-80 IOPS In a mirrored configuration: Disk IOPS = Read IOPS + (2 * Write IOPS) In a parity (RAID5) configuration: Disk IOPS = Read IOPS + (4 * Write IOPS) Example calculations Now let's look at an example. If you estimate that you need to support 40 Read IOPS (40 reads/sec) and 80 Write IOPS (80 writes/sec). If you want to use a mirrored configuration of drives: Disk IOPS = Read IOPS + (2 * Write IOPS) = 40r/s + (2 * 80w/s) = 200 Disk IOPSUsing 7200 rpm drives, you need: 200 / 50 = 4 disk drives Using 10k rpm drives, you need: 200 / 130 = 2 disk drives (always round up) If you want ...

Linux: checking the parent id and its threads

In Linux, there variety of tools you can use to check on the processes, but most of these are just the same. One of them is ps or you can use htop. In the following, I'm using ps just to show the processes and threads spawn by the parent process to create the threads processes. [root@centos ~]# ps -p `pidof mysqlslap` -Lf UID        PID  PPID   LWP  C NLWP STIME TTY          TIME CMD root      6615 12502  6615  0    6 09:43 pts/1    00:00:00 mysqlslap --concurrency=5 --iterations=10 --query=select * from AddressCode; --user=root root      6615 12502  6783  1    6 10:09 pts/1    00:00:00 mysqlslap --concurrency=5 --iterations=10 --query=select * from AddressCode; --user=root root      6615 12502  6784  1    6 10:09 pts/1    00:00:00 mysqlslap --concurrency=5 --iterations=10 --query=select...

Converting sectors into MB - Useful in understanding the sectors in iostat in Linux

Supposed you have a sector with 512 Bytes equivalent, then the formula will be just below 1 sect. 1024 Bytes 1024 KB --------- x ---------- x --------- = 2048 sect./ MB 512 Bytes 1 KB 1 MB i.e. if a sector has a 512 Bytes, commonly in a hard disk, so which means that a 1024 Bytes == 2 sector of a KiloByte. So if 2 sector is equivalent to a KiloByte (1024 Bytes), if you do the math, 2 ** 1024 / 512.0 = 2048. This is useful only understanding the iostat process in Linux.

Helpful resources for gdb tool

I just wanted to share these links, http://poormansprofiler.org/ http://dom.as/2009/02/15/poor-mans-contention-profiling/