Slow site, server is not overloaded

pagerules
caching
wordpress

#1

I use dedicated server very powerful, but my site is slow and the server is not overloaded, few users online but still slow.
when I put the firewall on-attack it loads fast, this happens sometimes, but I can not leave in the attack mode because I have application and it goes offline if it is in that security option.
what should I do? Is there something I have to buy? Can cloudflare help me? I use litespeed on my server.