Startup memory difference Percona Server vs MariaDB

When browsing for FreeBSD ports on database section I stumbleupon percona server and decide to see whats the difference between pkg and ports :

update pkg

# pkg update
Updating FreeBSD repository catalogue…
FreeBSD repository is up-to-date.
All repositories are up-to-date.
#

update ports

#portsnap fetch
#portsnap extract

pkg and ports give same version :

# cat /usr/ports/databases/percona56-server/Makefile | grep DISTVERSION
DISTVERSION=    5.6.19-67.0
MASTER_SITES=    http://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-${DISTVERSION}/source/tarball/
DISTNAME=    percona-server-${DISTVERSION}

# pkg install percona56-server
Updating FreeBSD repository catalogue…
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 packages will be affected (of 0 checked):

New packages to be INSTALLED:
percona56-server: 5.6.19.67.0
percona56-client: 5.6.19.67.0

The process will require 121 MB more space.
10 MB to be downloaded.

Proceed with this action? [y/N]: n

Install using pkg will only need 10MB and much faster than ports so I’ll use pkg 🙂

Stop MariaDB

# /usr/local/etc/rc.d/mysql.server.sh stop
Shutting down MySQL.. SUCCESS!

Re run pkg install

# pkg install percona56-server
Updating FreeBSD repository catalogue…
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 packages will be affected (of 0 checked):

New packages to be INSTALLED:
percona56-server: 5.6.19.67.0
percona56-client: 5.6.19.67.0

The process will require 121 MB more space.
10 MB to be downloaded.

Proceed with this action? [y/N]: y

Fetching percona56-server-5.6.19.67.0.txz: 100%    8 MB 117.5k/s    01:13
Fetching percona56-client-5.6.19.67.0.txz: 100%    2 MB 110.0k/s    00:17
Checking integrity… done (0 conflicting)
[1/2] Installing percona56-client-5.6.19.67.0: 100%
===> Creating users and/or groups.
Using existing group ‘mysql’.
Using existing user ‘mysql’.
[2/2] Installing percona56-server-5.6.19.67.0: 100%

Its idle FreeBSD 10 server. Since I don’t know yet equivalent command for ‘free -m’ in FreeBSD I use top and export it to a file (maria for top process list when running mariadb and percona for top process list when running percona).

The result is :

# cat maria

last pid: 48064;  load averages:  0.08,  0.06,  0.07  up 0+01:20:00    14:41:12
23 processes:  2 running, 21 sleeping

Mem: 63M Active, 22M Inact, 89M Wired, 2492K Cache, 59M Buf, 306M Free
Swap: 1024M Total, 10M Used, 1014M Free

PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
48059 mysql        23  52    0   457M 65512K sigwai   0:01   8.98% mysqld
911 alam          1  20    0 17576K  1504K select   0:10   0.00% sshd
779 root          1  20    0 10132K   408K nanslp   0:01   0.00% cron
915 root          1  23    0 10864K  1588K RUN      0:00   0.00% csh
772 root          1  20    0 12864K  1416K select   0:00   0.00% sendmail
908 root          1  20    0 17576K  1340K select   0:00   0.00% sshd
914 alam          1  20    0 10588K     0K wait     0:00   0.00% <su>
591 root          1  20    0 10096K   784K select   0:00   0.00% syslogd
47991 root          1  52    0 10472K  1716K wait     0:00   0.00% sh
912 alam          1  21    0 10476K     0K wait     0:00   0.00% <sh>
48064 root          1  23    0 11236K  1860K RUN      0:00   0.00% top
475 root          1  20    0  9380K    48K select   0:00   0.00% devd
775 smmsp         1  20    0 12864K     0K pause    0:00   0.00% <sendmail>
900 root          1  20    0 10084K   664K ttyin    0:00   0.00% getty
761 root          1  20    0 14816K  1268K select   0:00   0.00% sshd
906 root          1  52    0 10084K   664K ttyin    0:00   0.00% getty
907 root          1  52    0 10084K   664K ttyin    0:00   0.00% getty
901 root          1  52    0 10084K   664K ttyin    0:00   0.00% getty

# cat percona

last pid: 47972;  load averages:  0.02,  0.05,  0.07  up 0+01:19:09    14:40:21
23 processes:  2 running, 21 sleeping

Mem: 308M Active, 74M Inact, 90M Wired, 10M Cache, 59M Buf, 604K Free
Swap: 1024M Total, 65M Used, 959M Free, 6% Inuse

PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
911 alam          1  20    0 17576K  1504K select   0:10   0.00% sshd
779 root          1  20    0 10132K   400K nanslp   0:01   0.00% cron
47962 mysql        23  33    0   612M   379M sigwai   0:01   0.00% mysqld
915 root          1  20    0 10864K  1296K RUN      0:00   0.00% csh
772 root          1  20    0 12864K  1416K select   0:00   0.00% sendmail
908 root          1  20    0 17576K  1340K select   0:00   0.00% sshd
914 alam          1  20    0 10588K     0K wait     0:00   0.00% <su>
591 root          1  20    0 10096K   784K select   0:00   0.00% syslogd
47866 mysql         1  52    0 10472K     0K wait     0:00   0.00% <sh>
912 alam          1  21    0 10476K     0K wait     0:00   0.00% <sh>
47972 root          1  20    0 11236K  1704K RUN      0:00   0.00% top
475 root          1  20    0  9380K    48K select   0:00   0.00% devd
775 smmsp         1  20    0 12864K     0K pause    0:00   0.00% <sendmail>
900 root          1  20    0 10084K   664K ttyin    0:00   0.00% getty
761 root          1  20    0 14816K  1268K select   0:00   0.00% sshd
906 root          1  52    0 10084K   664K ttyin    0:00   0.00% getty
907 root          1  52    0 10084K   664K ttyin    0:00   0.00% getty
901 root          1  52    0 10084K   664K ttyin    0:00   0.00% getty

I see big difference between them specially for percona but I don’t know how they use memory.

p.s :

MariaDB installled from source (MariaDB 10) and Percona Server from pkg on FreeBSD 10 that run from VirtualBox. I think I’ll try it on FreeBSD 10 64 bit on vps.

Programmer T-Shirts

Working as Programmer + Sysadmin is something that I never Imagine before. Look for bug and error while monitoring mysql memory usage using top command is never been easy. The only way to get happy is fix the bug and able to find out how to minimize server load 🙂

I’ve seen so many quote around programmer that turn into programmer t-shirts which is good to see in various form. I’ve list it in this post for my future reference when I want to buy one or perhaps a clue for my gift 🙂

code.org t-shirts

Keep Calm and Code ON

I'm a Programmer. I write code t-shirt with the word programmer being misspelled multiple times.

I’m a Programmer. I write code t-shirt with the word programmer being misspelled multiple times.

Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots.

Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots.

More

Random features product line. Great humorous products for the computer programmers in your life

Random features product line. Great humorous products for the computer programmers in your life

A Programmer, or application developer, is not an easy job. You have to know a lot of things and perform a lot of tasks. This design is the perfect job description for a programmer. It simply states what a programmer does every day of their career.

A Programmer, or application developer, is not an easy job. You have to know a lot of things and perform a lot of tasks. This design is the perfect job description for a programmer. It simply states what a programmer does every day of their career.

You consider 256 to be a nice, round number. You are annoyed when 10K means 10,000. You start counting from 0. Your sentences end with a semi-colon

You consider 256 to be a nice, round number. You are annoyed when 10K means 10,000. You start counting from 0. Your sentences end with a semi-colon

Programmer n. (proh-gram-er) an organism that turns caffeine and pizza into software

Programmer n. (proh-gram-er) an organism that turns caffeine and pizza into software

Geek T-Shirt

Physics T-shirt on Dark background. With the following words - Physics, Acceleration, Mass, Particles, Thermodynamics, gravity, hawking, big bang, black holes, electromagnetic, maxwell, quantum mechanics, strings, radiation, tesla, force, e=mc2, gas, atom, proton, nuclear, hertz, radiation, gamma , absolute 0, nanotech, orbit, frequency, weight

Physics T-shirt on Dark background. With the following words – Physics, Acceleration, Mass, Particles, Thermodynamics, gravity, hawking, big bang, black holes, electromagnetic, maxwell, quantum mechanics, strings, radiation, tesla, force, e=mc2, gas, atom, proton, nuclear, hertz, radiation, gamma , absolute 0, nanotech, orbit, frequency, weight

Geek by nature, linux by choice

Geek by nature, linux by choice

Error 404 Costume Not Found, Funny and clever Anti-Halloween Geek web programmer t-shirt is great for the guy who refuses to wear a costume.

Error 404 Costume Not Found, Funny and clever Anti-Halloween Geek web programmer t-shirt is great for the guy who refuses to wear a costume.

Hilarious 'Holy Shift! Look at the asymptote on that mother function' Math Geek T-Shirt.

Hilarious ‘Holy Shift! Look at the asymptote on that mother function’ Math Geek T-Shirt.

This is an original t-shirt design that celebrates science and some of the cool equipment you find in a lab. This would be perfect for any science geek.

This is an original t-shirt design that celebrates science and some of the cool equipment you find in a lab

And God said [Maxwell's equations] and there was light.

And God said [Maxwell’s equations] and there was light.

in fun | 440 Words

How to Install MariaDB 10 on FreeBSD 10

Today I have chance to visit my friend blog. He ask me to look for wordpress theme that not work  after recent wordpress upgrade. The solution is simple : reupload his theme 🙂 . One thing that bother me is his cpanel show me version of mysql server he use. His cpanel using mariadb 10.mariadb10

Wow. Its first time I see mariadb in cpanel. Remind me on my FreeBSD 10 server. I want it too 🙂 .

After jump into my freebsd box I realized that no ports available for mariadb 10 (at the moment) :

# ls | grep maria

mariadb-client
mariadb-scripts
mariadb-server
mariadb55-client
mariadb55-server

# cat mariadb-server/Makefile | more
# $FreeBSD: tags/RELEASE_10_0_0/databases/mariadb-server/Makefile 336187 2013-12-11 18:08:52Z bapt $ Continue reading

FreeBSD 10 pkg update and pkg upgrade

As ports lover I’m bit confuse when my friend told me about pkg. The page list the difference between pkg vs pkg_ command. I decide to try it on my experiment vps that almost abandoned. The machine already have a few package installed. A perfect companion for the experiment.

# pkg info
apache22-2.2.26                Version 2.2.x of Apache web server with prefork MPM.
apr-1.4.8.1.5.3                Apache Portability Library
autoconf-2.69                  Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
ca_root_nss-3.15.3.1           The root certificate bundle from the Mozilla Project
curl-7.33.0_1                  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
db42-4.2.52_5                  The Berkeley DB package, revision 4.2
dialog4ports-0.1.5_2           Console Interface to configure ports
expat-2.1.0                    XML 1.0 parser written in C
freetype2-2.5.0.1              Free and portable TrueType font rendering engine
gdbm-1.10                      GNU database manager
gettext-0.18.3.1               GNU gettext package
gmake-3.82_1                   GNU version of ‘make’ utility
help2man-1.43.3_1              Automatically generating simple manual pages from program output
libtool-2.4.2_2                Generic shared library support script
libxml2-2.8.0_3                XML parser library for GNOME
m4-1.4.17,1                    GNU m4
p5-Locale-gettext-1.05_3       Message handling functions
pcre-8.33                      Perl Compatible Regular Expressions library
perl5-5.16.3_4                 Practical Extraction and Report Language
pkg-1.2.4_1                    New generation package manager
pkgconf-0.9.3                  Utility to help to configure compiler and linker flags

# pkg update
Updating repository catalogue
digests.txz                                                                                                                 100% 1821KB 121.4KB/s  80.7KB/s   00:15
packagesite.txz                                                                                                             100% 4628KB 112.9KB/s  78.2KB/s   00:41
Incremental update completed, 21447 packages processed:
0 packages updated, 0 removed and 21447 added. Continue reading

Remove all php on FreeBSD 10

Just quick note for my self. New php application use php 5.3+ and FreeBSD box have php 5.2 installed.

# pkg info | grep php
php52-5.2.17_15                PHP Scripting Language
php52-ctype-5.2.17_15          The ctype shared extension for php
php52-curl-5.2.17_15           The curl shared extension for php
php52-dom-5.2.17_15            The dom shared extension for php
php52-filter-5.2.17_15         The filter shared extension for php
php52-pcre-5.2.17_15           The pcre shared extension for php
php52-simplexml-5.2.17_15      The simplexml shared extension for php
php52-spl-5.2.17_15            The spl shared extension for php

Remove all php package (php 5.2) :

# pkg delete -x php
Deinstallation has been requested for the following 8 packages:

php52-ctype-5.2.17_15
php52-curl-5.2.17_15
php52-dom-5.2.17_15
php52-filter-5.2.17_15
php52-spl-5.2.17_15
php52-pcre-5.2.17_15
php52-simplexml-5.2.17_15
php52-5.2.17_15

The deinstallation will free 8 MB

Proceed with deinstalling packages [y/N]: y
[1/8] Deleting php52-ctype-5.2.17_15… done
[2/8] Deleting php52-curl-5.2.17_15… done
[3/8] Deleting php52-dom-5.2.17_15… done
[4/8] Deleting php52-filter-5.2.17_15… done
[5/8] Deleting php52-spl-5.2.17_15… done
[6/8] Deleting php52-pcre-5.2.17_15… done
[7/8] Deleting php52-simplexml-5.2.17_15… done
[8/8] Deleting php52-5.2.17_15…[preparing module `php5′ in /usr/local/etc/apache22/httpd.conf]
done

# pkg info
apache22-2.2.26                Version 2.2.x of Apache web server with prefork MPM.
apr-1.4.8.1.5.3                Apache Portability Library
autoconf-2.69                  Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
ca_root_nss-3.15.3.1           The root certificate bundle from the Mozilla Project
curl-7.33.0_1                  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
db42-4.2.52_5                  The Berkeley DB package, revision 4.2
dialog4ports-0.1.5_2           Console Interface to configure ports
expat-2.1.0                    XML 1.0 parser written in C
freetype2-2.5.0.1              Free and portable TrueType font rendering engine
gdbm-1.10                      GNU database manager
gettext-0.18.3.1               GNU gettext package
gmake-3.82_1                   GNU version of ‘make’ utility
help2man-1.43.3_1              Automatically generating simple manual pages from program output
libtool-2.4.2_2                Generic shared library support script
libxml2-2.8.0_3                XML parser library for GNOME
m4-1.4.17,1                    GNU m4
p5-Locale-gettext-1.05_3       Message handling functions
pcre-8.33                      Perl Compatible Regular Expressions library
perl5-5.16.3_4                 Practical Extraction and Report Language
pkg-1.2.4_1                    New generation package manager
pkgconf-0.9.3                  Utility to help to configure compiler and linker flags

Nice.