While testing I noticed that flush_caches cannot be configured on PS 5.7 instance where on systems using systemd. This is due to the fact that mysql_safe script is not installed I think. The following message is dispayed
mysqld_safe wont be installed on platforms that use systemd to manage MySQL
These messages are helpful as well:
systemd starts two scripts https://github.com/percona/percona-server/blob/5.7/build-ps/ubuntu/percona-server-server-5.7.mysql.service :
First could be found at https://github.com/percona/percona-server/blob/5.7/build-ps/ubuntu/extra/mysql-systemd-start and it fixes THP settings
second is also related to THP and enables jemalloc: https://github.com/percona/percona-server/blob/5.7/scripts/ps_mysqld_helper.sh
report a bug and ask to support flush caches as well in these helper script for correct large pages work.
Can flush_caches be supported on systemd