Use of all 24 threads is fine, but you will start to see losses in efficiency. It may be possible to get similar performance with say 20 threads, and also leave a little resources available for other applications. There is overhead in processing that is required to manage each thread basically, and when you have tons of threads, the overhead is higher relatively speaking, thus it reduces efficiency. It's worth testing 20 vs. 24 threads. But in general there's no need to mess with it.
Regarding caches, do not change it unless Terragen gives a warning and asks you to. 100MB per thread is good, as archonforest mentions, and Terragen *should* automatically adjust this as it detects more cores and allocates more threads. Larger caches do *not* inherently result in better performance. 100MB/thread is fairly optimal in most cases, especially with high thread counts.
- Oshyan