if the speed improves leave it. even if it stays the same leave it for now. if Mysql wont start then revert.Will do and revert back
based onOPCache both enabled)
Mysql lets try this.
ok in the /etc/my.cnf
Code:
Make it look like this. Note: put your server fqdn where it shows "server.domainname.com"Code:nano /etc/my.cnf
Code:
then restart mariaDB withCode:[mysqld] #local values local-infile=0 #skip-name-resolve=1 #log-error=/usr/local/mysql/data/server.domainname.com.err bind-address = 127.0.0.1 max_allowed_packet=64MB #max_connections=25 wait_timeout=100 #innodb values innodb_log_file_size=512MB #25% of Buffer pool innodb_file_per_table innodb_buffer_pool_size=4G # 50% of memory innodb_buffer_pool_instances=4 #1 per GB #temp values tmpdir=/tmp join_buffer_size=256k table_definition_cache=1000 thread_cache_size=1000
Code:
Code:systemctl restart mariadb systemctl status mariadb OR systemctl restart mysqld systemctl status mysqld
[root@****** etc]# systemctl restart mysqld
[root@****** etc]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2021-06-30 17:53:35 SAST; 11s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 3055534 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 3055512 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 3055536 (mysqld)
CGroup: /system.slice/mysqld.service
└─3055536 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
Jun 30 17:53:30 ******.********.com systemd[1]: Starting MySQL Server...
Jun 30 17:53:35 ******.********.com systemd[1]: Started MySQL Server.
[root@****** etc]#
in options file what is the webserver? Apache or some form of Litespeed?
#WEB Server Settings
unit=no
webserver=apache
http_methods=ALL
litespeed_serialno=trial
modsecurity=yes
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=worker
mod_ruid2=no
userdir_access=no
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=******.*********.com
redirect_host_https=no
#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_public=yes
phpmyadmin_ver=5
squirrelmail=yes
roundcube=yes
webapps_inbox_prefix=no
I think it is selected there because we run Cloudlinux. This was pointed earlier in the thread here by k1l0b1t which also made me raise my eyebrows because I too thought that the only time it was meant to be used was if we were using LiteSpeed which we are not:If you dont have Litespeed you shouldn't have lsphp set in the php section.
We run CloudLinux so each account runs in its own container. OPCache is enabled in the PHP options on the specific accounts that we have been using for testing or am I missing something? The command is being run by root and that setting is applicable to the current user or is it not? If I run phpinfo() on the account, it shows the Zend OPCache module as enabled. I've PM'd you the link to check the PHP setup on the account.based on
root@***** /]# php -v
PHP 7.4.20 (cli) (built: Jun 17 2021 13:01:33) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
you dont have opcache on.
it should look similar to this
PHP 7.4.20 (cli) (built: Jun 17 2021 16:38:28) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.4.20, Copyright (c), by Zend Technologies
So is this a shared server account or VPS?We run CloudLinux so each account runs in its container.
Not shared but multiple websites on a VPS owned by a single client. The client has a friend who also uses the server and he is afraid that the friends website might gobble resources from his websites. He also doesn't want his less important sites consuming too much resources for his main site so I recommended CloudLinux.So is this a shared server account or VPS?
opcache.memory_consumption=384
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=16000
opcache.revalidate_freq=48
shared.multiple websites on a VPS owned by a single client.
Well good. leave that config in mysql for now.
Well if we want lsphp on cloudlinux we would have to follow documentation for that. if not we should remove it I think. not a 100% sure i dont use cl
Lets try this for opcache in the account we wan to be fast can you set?
Code:opcache.memory_consumption=384 opcache.interned_strings_buffer=16 opcache.max_accelerated_files=16000 opcache.revalidate_freq=48
you will need to cycle php and apache
I was assuming it was one big server.
shared.
If its got multiple accounts essentially its shared.
Well depending on how many sites and what the traffic and resource usage is cloudlinux could be more of a burden
Please do share because I am so confused right now. It seems that if we are using CloudLinux, then the php1_mode must be set to lsphp. This is set this way to lsphp. In the help tip it saysthe following:I can show you the global way. If you want to try that.
cd /usr/local/directadmin/custombuild
mkdir -p custom/opcache
cp -p configure/opcache/opcache.ini custom/opcache/opcache.ini
opcache.memory_consumption=384
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=16000
opcache.revalidate_freq=48
cd /usr/local/directadmin/custombuild
./build opcache
opCache is now installed for PHP 7.4.
CageFS: Executing 'cagefsctl --force-update'...
Copying /usr/local/php74/lib/php.conf.d/10-directadmin.ini to /usr/share/cagefs-skeleton/usr/local/php74/lib/php.conf.d/10-directadmin.ini
Updating users ...
Updating statuses of users ...
[root@****** custombuild]# cat /usr/share/cagefs-skeleton/usr/local/php74/lib/php.conf.d/10-directadmin.ini
extension_dir=/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902
zend_extension=/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/opcache.so
opcache.memory_consumption=384
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=16000
opcache.revalidate_freq=48
opcache.enable_cli=1
opcache.validate_permission=1
opcache.use_cwd=1
opcache.revalidate_path=1
opcache.enable_file_override=1
already done that. no changeOk cool do the second part now. https://forum.directadmin.com/threa...p-file-behaving-erratically.63821/post-332755
what is
Code:cat /usr/local/php74/lib/php.conf.d/10-directadmin.ini
[root@*******custombuild]# cat /usr/local/php74/lib/php.conf.d/10-directadmin.ini
extension_dir=/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902
zend_extension=/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/opcache.so
opcache.memory_consumption=384
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=16000
opcache.revalidate_freq=48
opcache.enable_cli=1
opcache.validate_permission=1
opcache.use_cwd=1
opcache.revalidate_path=1
opcache.enable_file_override=1
Done, no output at all....just went back to the cli.try running
Code:cagefsctl --rebuild-alt-php-ini