0 Comments

MySQL and memory Allocators malloc, tcmalloc and jemalloc

Memory Allocation in UNIX: UNIX uses C dynamic memory allocation libraries for memory allocation. Namely malloc, realloc, calloc and free   are used.  Functions of these liberaries are given below.   Function Description malloc allocates the specified number of bytes realloc Increases or decreases the size of the specified block of memory. Reallocates it if needed calloc allocates the specified number […]

0 Comments

Reduce startup and shutdown time by using warm up innodb buffer pool

Reduce startup and shutdown time by using warm up innodb buffer pool For database servers having large memory utilisation and have big innodb_buffer_pool_size , it takes longer to stop and start the instance. This is because more data and indexes stored in huge  innodb_buffer_pool. This data and indexes are used by queries running on the […]

0 Comments

Fine tune MySQL for Better performance

Few issues I came across when dealing with MySQL performance. Let us go through these problems one by one. Swap usage: MySQL loves memory as almost all databases do but MySQL tries to utilise all  the possible available memory. In order to restrict MySQL to use allocated memory resources we should implement following:-  Swapiness Swappiness […]

0 Comments

Oracle VS MySQL file architecture

Oracle VS MySQL file architecture For  Oracle database administrator, when it comes to learn new technology it always starts from comparison with respect to physical or logical architecture. Physical file architecture  comparison is given below , I hope it will be very useful for Oracle or MySQL database administrators who want to learn either of […]

0 Comments

Connecting to MySQL using authenticated credentials login path using MySQL_config_editor

mysql_config_editor  (utility to configure authentication information for connecting to MySQL server) Introduction: Normally we connect to MySQL using username , password , socket  or host etc as shown below. bash-4.2$  mysql -uroot -p  -h testmysql -S /var/log/mysql.sock  Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 40974 […]

0 Comments

Read files using arrays in Bash script

Read files using arrays in Bash script I have following file with some numeric contents in it bash-4.2$ cat /tmp/araytest.txt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 If we would like save the file contents in Array. We can using following method. while read LINE do ARRAY+=(“$LINE”) done […]

0 Comments

Fixing Broken GTID enabled replication ERROR 1858 (HY000):

Broken replication because of duplicate values MySQL 5.6 onward : In non GTID enabled replication , we use to skip duplicate errors in case of Last_Errno: 1062 . But once we enable GTID we will have to deal it differently. The procedure is to follow the following simple steps Let use assume two server  A as master […]

0 Comments

Split file into multiple files using split command line utility on unix / linux

Split Command in Unix / Linux: This utility / command in unix or linux helps to split the file into two or more files. We have multiple options to use the command as per our needs. Syntax : split [filename] [INPUT [PREFIX] ] where [filename] is the name of file we want to split. [INPUT […]