I am sorry if i sound rude, but at the moment your post reads to me like this: my server is slow, its plesk's fault: fix it!
You don't say what OS you have, what you have already investigated and ruled out, not even what plesk version you have (onyx isn't a versionnumber, its a name).
If its fast one time and slow another, you need to log in at a moment its slow and investigate. There are some very simple but effective tools you can use for that:
top, htop, apache server-status page, ioping, apachetop, mtop, iotop, just to name a few.
a slow server can have several reasons:
on server level
- is this a vps?
- how many cpu's?
- what is the speed of those cpu's?
a vps running on an E5620 and HDD is very different then one running on an E5-2650v4 with SSD.
- how much memory?
- what is the speed of that memory?
- sometimes a restart works wonders, but i guess you did that end last week because there where kernel security updates. (atleast on centos)
server but software
- do you have tuned-adm installed an the correct profile for your server?
- is /etc/sysctl.conf optimized?
on software level
- are queries optimized?
- what does the slow-querie log says?
- does php have enough recources?
- is mysql configuration optimized?
- what version of mysql? 5.6 is a lot faster then 5.1
MySQL 5.1 vs. 5.5 vs. 5.6 Performance Comparison – Liquid Web Knowledge Base
- do tables have the correct indexes?
- are there many smtp connections?
- is there many incomming mail?
- does every mailbox have spamassassin? that can eat resources too
- ....
- ....
- ....
- and a thousand other things.
Given that, does it have to read all the logs on a Domain Level????
depends on the jails you use. if you use jails like plesk-apache or plesk-wordpress then yes.
Could you elaborate on how you do this:
"Things where fail2ban would use domain access_logs or error_logs, we try to intercept with mod_security"
Have the best rules possible and active maintain them.
we use a custom rule set that is a mix of these.
Not all of it from everything, but those things that work:
asl rules
pfsence rules (converted by us to mod_sec 2.x)
pfsense-packages/config/apache_mod_security/rules at master · pfsense/pfsense-packages · GitHub
flameye rules
modsec-flameeyes/rules at master · Flameeyes/modsec-flameeyes · GitHub
linulex rules: whenever we see something that tries to harm sites, we create a rule of our own.
these are some examples of our own rules:
Code:
# spam
SecRule REQUEST_URI "sys09725848\.php" "phase:2,id:1070"
# stress test
SecRule REQUEST_URI "cstress\.net" "phase:2,id:1080"
SecRule REQUEST_URI "cstress\.org" "phase:2,id:1081"
SecRule REQUEST_URI "corepillar" "phase:2,id:1082"
#HTTP header semalt
SecRule HTTP_Referer|ARGS "semalt.semalt.com" "phase:2,id:1095"
SecRule HTTP_Referer|ARGS "semalt.com" "phase:2,id:1096"
keeping mod_sec rules up-to-date is something you should spend every week at least 30 minutes on. Hackers also spend time on there scripts to find new ways to hack you and server and/or website security is nothing more then the effort of keeping ahead of the bad guys.
regards
Jan