FEMP is an acronym that stands for FreeBSD (operating system), Nginx (HTTP server pronounced Engine-x), MySQL (database server), and PHP (programming language to process dynamic PHP content). In this tutorial, we'll set up components of a FEMP stack on a FreeBSD 12.1 server using pkg, the FreeBSD package manager.
10 Older Entries »
Starting with version 8.0.18 the MySQL Workbench source package finally ships also all our GPL unit and integration tests, which we are using internally to control code quality. For that we had first to replace our old, outdated testing framework by something new and more appropriate. We evaluated quite a few C++ testing frameworks but found them either not to be sufficient or difficult to use. Instead we had something in mind that comes close to the Jasmine framework which is widely used among JS developers. The way it hides all the boring test management details and the clear structure it uses, was quite an inspiration for us and we decided to develop our own testing framework modeled after that.
Casmine – C++17 BDD Testing Framework
Casmine is a C++ unit and integration testing …[Read more]
Recently, at Percona Live Europe 2019, Dimitri Kravchuk from Oracle mentioned that he observed some unclear drop in performance for MySQL on an ext4 filesystem with the latest Linux kernels. I decided to check this case out on my side and found out that indeed, starting from linux kernel 4.9, there are some cases with notable (up to 2x) performance drops for ext4 filesystem in direct i/o mode.
So what’s wrong with ext4? It started in 2016 from the patch that was pushed to kernel 4.9: “ext4: Allow parallel DIO reads”. The purpose of that patch was to help to improve read scalability in direct i/o mode. However, along with improvements in pure read workloads, it also introduced regression in intense mixed random read/write scenarios. And it’s quite weird, but this issue had not been …[Read more]
Its not the new term for DBAs. MySQL has an awesome parameter
innodb-file-per-tables allows MySQL to create
separate files for each tables. This helped a lot to manage the
disk space in more efficient way. But when we perform a large
batch job for delete or update the data in MySQL tables, you may
face this fragmentation issue. Comparing with SQL server, MySQL’s
fragmentation is not high. I had a similar situation where my
Disk space was consuming 80% and when I check the huge files in
OS, one table’s
idb file consumed 300GB+. I know it
has some wasted blocks(but not actually wasted, MySQL will use
this space, it’ll not return this to OS) Then I checked the
information schema to find out the data size and its
index size. It was 27GB only. Then I realize, we did a batch
operation to delete many billions of records in that table.
Thanks to Rolando - MySQL DBA:
When I searched the similar …[Read more]
Bolt is a sophisticated, lightweight and simple CMS built with PHP. This tutorial shows the installation of Bolt CMS in FreeBSD 12 with Nginx web server, MySQL database server and Let's Encrypt SSL certificate.
Somebody asked me how to expand a prior example with the static variables so
that it took arguments at the command line for the variables.
This example uses Python 3 new features in the
There’s a small trick converting the
date data types. Here’s a quick example
that shows you how to convert the argument list into individual
date data type variables:
#!/usr/bin/python3 # include standard modules import sys from datetime import datetime # Capture argument list. fullCmdArguments = sys.argv # Assignable variables. beginDate = "" endDate = "" # Assign argument list to variable. argumentList = fullCmdArguments[1:] # Enumerate through the argument list where beginDate precedes endDate as strings. try: for i, s in enumerate(argumentList): if (i == …[Read more]
In this short blog post, we will check how to use linux-fincore to check which files are in the in-memory Linux page cache. To have an introductory read about the Linux page cache check here and here.
In summary, whenever you read from or write to a file (unless you are using Direct_IO to bypass the functionality), the result is cached in memory, so that subsequent requests can be served from it, instead of the orders of magnitude-slower disk subsystem (it can also be used to cache writes, before flushing them to disk). This is done as far as there is memory that is not being used by any process; whenever there is a shortage of otherwise free memory, the kernel will choose to first evict the page cache …[Read more]
There was an option during the Fedora 30 Workstation installation
to add the Apache Web Server, but you need to set it to start
automatically. Unfortunately, there was no option to install PHP,
which I thought odd because of how many web developers learn the
trade first on PHP with a LAMP (Linux, Apache, MySQL,
Perl/PHP/Python) stack. You see how to fix that shortcoming in
this post and how to install and test PHP,
pdo to support MySQL 8.
Before you do that make sure you install MySQL 8. You can find my prior blog post on that here.
You set Apache to start automatically, on the next boot of the operating system, with the following command:
chkconfig httpd on
It creates a symbolic link:
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → …[Read more]
Matomo (formerly Piwik) is a free and open-source web analytics application developed by a team of international developers, that runs on a PHP/MySQL webserver. This tutorial will show you how to install Matomo on a FreeBSD 12.0 system using Nginx as the webserver and we will secure the website with a Let's Encrypt SSL certificate.
errno: 24 - Too many open files
You might see this error inside MySQL's error log file or during mysql_upgrade operation.
Can't open file: ‘./db/table.frm' (errno: 24 - Too many open files)
To solve this issue, you will need to change the open files limit at system and db service level.
--> To check and change this limit at the system level, we use ulimit client tool to set it dynamically.
* Check current system open file limit.
root@test:~# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling …
10 Older Entries »