best dedicated server settings for speed and performance?

zoldos

Well-known member
I'm now running a fully dedicated server with Ubuntu 20.04 LTS and Plesk Obsidian 18 with the below stats/settings:

8 core Intel Xeon CPU E3-1230 v3 @ 3.30GHz
32GB DDR3 RAM
2x2TB Raid SATA III
PHP 8.0.28, Dedicated FPM app served by nginx
1GB bandwidth

PHP FPM Settings:

Max Children: 75
Max Requests: Default
pm: dynamic
pm.start_servers: 10
pm.min_spare_servers: 5
pm.max_spare_servers: 20

I also use ngnix and op cache.

It's very fast, but sometimes takes 4 or 5 seconds to load a page, or post an animated GIF. Is this normal? I can understand on a shared server.

What can I do to make it respond faster? Thanks!
 
At least use SSD storage; if all add-ons are compatible, try PHP 8.1.x.
Why not use the latest LTS? Ubuntu 22.04.

Try with PM settings set to static instead of dynamic, with a value of 32 based on your 8-core CPU.
Use Redis for data caching and Cloudflare for static and guest full-page caching.
 
Its certainly not normal and you have capable hardware. There are lots of reasons why it might be slow, but hard to say what the problem is without a deeper dive.

You have plenty RAM there, so make sure most of your SQL is cached and then the disks will not be hit much for reads anyway.

The php/nginx settings above only really start coming into play when you have lots of concurrent users.

I take it this isn't a brand new server? If it is, something like the building of the RAID volumes might be going on in the background - have a look to see what i/o is happening on the disks
 
At least use SSD storage; if all add-ons are compatible, try PHP 8.1.x.
Why not use the latest LTS? Ubuntu 22.04.

Try with PM settings set to static instead of dynamic, with a value of 32 based on your 8-core CPU.
Use Redis for data caching and Cloudflare for static and guest full-page caching.
What about PHP 8.2?

I was able to choose between a 500GB SSD or a 2TB SATA III server. I chose the 2TB (2x2TB RAID) to ensure enough space for well into the future. Plus it was a bit less expensive. My site is lightning fast, but sometimes has noticeable lag.....

I used a temp;ate my host offers and among the many choices, I didn't see 22.04.

Also, with PM set to "static", all other settings are greyed out except "pm.max_children", and "pm.max_requests". Should I set these to 32?

Thanks!
 
Its certainly not normal and you have capable hardware. There are lots of reasons why it might be slow, but hard to say what the problem is without a deeper dive.

You have plenty RAM there, so make sure most of your SQL is cached and then the disks will not be hit much for reads anyway.

The php/nginx settings above only really start coming into play when you have lots of concurrent users.

I take it this isn't a brand new server? If it is, something like the building of the RAID volumes might be going on in the background - have a look to see what i/o is happening on the disks
How do I cache the SQL?

It took about 4 hours to build the server from a template my host provides, most of that being the RAID partitioning etc. so, I'm pretty sure it isn't that. I/O seems pretty low....
 
What about PHP 8.2?
If that works fine with all your add-ons, then it would be great.
I have it running fine on my development site.

I was able to choose between a 500GB SSD or a 2TB SATA III server. I chose the 2TB (2x2TB RAID) to ensure enough space for well into the future.
As suggested above, make sure your MySQL database is full on InnoDB with no MyIsam table, and make sure all those data are cached on your RAM so it's not hitting your HDD and making it slower.

But still, I would choose SSD every time I hosted a database on a server.

Also, with PM set to "static", all other settings are greyed out except "pm.max_children", and "pm.max_requests". Should I set these to 32?
Yes, that is expected, and there's no problem with that being grayed out as it's not used anymore.

How do I cache the SQL?
On your my.cnf
Look for innodb_buffer_pool_size must be a little bit higher than your total InnoDB table size.
 
Last edited:
This is the way.

And also SSD. Spinning platters are for suckers these days. Then use Cloudflare R2 for attachment growth.
I don't think I can go back, as they'd have to physically re-assign my hosting (it's a different package with a different price). I'm running redis now which seems to help.

What about memcached?
 
I don't think I can go back, as they'd have to physically re-assign my hosting (it's a different package with a different price). I'm running redis now which seems to help.

What about memcached?
Then have them add an SSD. You really don't want to be running off platters anymore, especially a database. But I suspect your forum isn't very large, so it may be fine for a while.
 
I'm running redis now which seems to help.

What about memcached?
If your script supports it... use Redis... it's much better.
And future suggestion...yes, those larger sizes of platter drives look great.... but your better served by an SSD format drive (as long as it's a true server level SSD). Platter may be fine for image serving, but for mySQL and such (say disk caches) it's much slower.
If I was getting dedicated iron now, I'd make sure it had at least 2 server grade SSD's RAID1 (prefer 4 at hardware level RAID1). Then one I needed it, I'd be moving my attachments/images off onto S3/R2.
 
Last edited:
Thanks so much for all the feedback! I've implemented Redis, raised the InnoDB pool size, and changed my FPM settings. It seems faster now (instant response most times, and then maybe a 2 or 3 second delay occasionally, but noticeable). Is this normal for my server specs and the standard HDDs? I mean, it's definitely better than my prior shared account, and just like $5 more for fully dedicated (as compared to the old host's "Shared Ultra" plan).

I suppose it's the non-SSD. My host even offers NVME drives, as well as standard SSD. But, this is a hobby, and I don't make money from my site. I'm paying around $47 a month currently. I need to pay off my truck and a new PC I am making payments on. Both of those are done next month. Then I'll see what I can do as far as upgrades to the drives.

:cool:
 
Back
Top Bottom