Any suggestions?
reddit / freebsd
----------------------------------------------------------------------
MyJewishFuzzyNutz · 2022-06-24 19:23
Hello,
I'm trying to do some benchmarking of our company's software packages.
Currently they love CentOS, but I like performance so I've started
doing comparisons of FreeBSD vs CentOS. I noticed that using native
ZFS support really makes a huge difference on MySQL versus UFS. I'm
wondering if there's a way to tweak MySQL to run even faster? These
systems are VMs on brand new hardware attached to a 12GB HBA, so yeah,
it's nice.
I'm using sysbench to gauge MySQL, however, I'm wondering what I can
use for apache testing? Are there any other pitfalls I should know
about? I would like to get a benchmark on disk I/O as well. I didn't
find bsdsar in the ports collection, so I'm unsure about sysstat
monitoring. IOSTAT is included, so that's good.
Our company provides managed services for client HPC environments, and
currently the HPC management software is deployed on CentOS or Ubuntu,
but I'm hoping to change that once they see the benchmarks.
I appreciate the heads up and thanks.
----------------------------------------------------------------------
gumnos · 2022-06-24 19:55
> I'm wondering if there's a way to tweak MySQL to run even faster?
While I'm less versed in MySQL on ZFS, but know there are some [good
Postgres-on-ZFS resources](https://vadosware.io/post/everything-ive-
seen-on-optimizing-postgres-on-zfs-on-linux/), I imagine many of the
aspects would carry over to MySQL. The biggest one I've observed is to
make sure that the database & ZFS page-sizes/block-sizes align, and
that if your workload is biased read-heavy, you might consider using
double the database page-size for your ZFS page-size to get more
aggressive read-ahead pre-loading. But ZFS compression can also get
you some nice speed wins that allow fewer bytes to have to come off
the drive.
> I'm using sysbench to gauge MySQL, however, I'm wondering what I can
use for apache testing?
For pure Apache testing, the go-to standard is [Apache
Benchmark](https://httpd.apache.org/docs/2.4/programs/ab.html) (`ab`)
> Are there any other pitfalls I should know about? I would like to
get a benchmark on disk I/O as well. I didn't find bsdsar in the ports
collection, so I'm unsure about sysstat monitoring. IOSTAT is
included, so that's good.
I find artificial disk benchmarks less helpful. You'd want any
benchmarks to replicate your real-world load. I imagine that your load
isn't reading thousands of files off the disk at a time, but reading
data from a database (in which case, your database benchmark stats
would give more useful results, particularly if they model your ratio
of reads-to-writes along with the volume of data in such
reads/writes); or reading a smaller number of files off the disk which
gets them into disk-cache and then using those without needing to re-
read them. If Apache is serving lots of static files off the disk,
make sure you're setting cache headers (though you'd also be heating
up your disk cache with the files, so subsequent reads should also be
faster).
And finally, if it's possible to replicate your production environment
into a test server, nothing provides useful statistics like actually
making real-world requests against the real-world application.
----------------------------------------------------------------------
hardwaresofton · 2022-06-24 23:13
Hey there, I wrote that first post that is a combination of other
peoples' good advice -- Here's [a post from Percona that's awesome for
ZFS + MySQL](https://www.percona.com/blog/2018/05/15/about-zfs-
performance/)
----------------------------------------------------------------------
gehenna-jezebel · 2022-06-25 04:12
Have you tried running your centOS stuff on freeBSD with native Linux
emulation? The Linux binaries in the package repo are based on centOS
and you may not need to tweak much to get anything you ran on centOS
to run natively on the BSD kernel.
----------------------------------------------------------------------
grahamperrin · 2022-06-25 08:14
> a post from Percona that's awesome for ZFS + MySQL
*About ZFS Performance - Percona Database Performance Blog*
(2018-05-15)
Discussions:
* (archived)
----------------------------------------------------------------------
grahamperrin · 2022-06-25 08:23
> … ZFS … tweak MySQL …
Not exactly an answer, but OpenZFS can be tuned for MySQL workloads:
----------------------------------------------------------------------
CoolTheCold · 2022-06-25 12:13
I do not love Centos or Ubuntu, those just work good enough, but if
you need someone to train on with your pitches of switching to FreeBSD
I may be able to share some valuable feedback.
For example: so far, from your questions it's clear your level of
expertise is say so so - even basic benchmarking is a problem for you.
Why should I trust idea of switching environments for someone who is
on very basic level.