Actually, limiting the number of days won't help performance much.
What you really need to do is remove the DaysPrune option entirely, then locking it to Show All (which is a really easy code change).
This sorta seems like the exact opposite of what makes sense in other boards, but let me explain.
We don't have a database, we have a bunch of index files. In order to generate the list of topics, we have to load the entire index, then sort it, then cut it off based on DaysPrune, then cut it off at the page we're looking at.
But in any case, we already have the entire sorted list.
In database products, specifying a smaller DaysPrune window would change the SQL query, resulting in less work for the SQL server, resulting in usually more speed. So specifying a pretty low DaysPrune there would make more sense.
So, by forcing everyone to see all topics, you actually save work. And on top of that, you also increase cache hits - now there's only one possible instance of the forum topic list rather than one for each possible DaysPrune. Performance boost.
Anyway.
So task 1: Nuke DaysPrune. Simple...
ultimatebb.cgi, find where %in is declared - it's a map. Right under it, enter:
$in{'hardset'} = 1000;
Then for the Accelerator... in ultimatebb.php, find
$TheFile = "";
And above it, enter:
$hardset = 1000;
That will cause the board to totally ignore DaysPrune entirely. Then you just need to remove the select list from the edit profile / registration templates (replace it with a hidden input with a value of 1000), then remove it from the forum template entirely.
And if your server is still getting thrashed... remember the general rules about Classic performance - try to keep less than 3000 topics in a forum (use the Mass Move tool to create read-only archives), turn off Recent Visitors, and prune away members.