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 sleepingMem: 63M Active, 22M Inact, 89M Wired, 2492K Cache, 59M Buf, 306M Free
Swap: 1024M Total, 10M Used, 1014M FreePID 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 sleepingMem: 308M Active, 74M Inact, 90M Wired, 10M Cache, 59M Buf, 604K Free
Swap: 1024M Total, 65M Used, 959M Free, 6% InusePID 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.