Skip to content

fix: better max_threads calculation#1446

Merged
dunglas merged 3 commits intomainfrom
fix/thread-calculation
Mar 19, 2025
Merged

fix: better max_threads calculation#1446
dunglas merged 3 commits intomainfrom
fix/thread-calculation

Conversation

@AlliBalliBaba
Copy link
Copy Markdown
Contributor

@AlliBalliBaba AlliBalliBaba commented Mar 15, 2025

I realized that when setting max_threads, the default behavior should be to minimize the amount of num_threads, in other words this configuration:

frankenphp {
    max_threads 20
    worker {
        num 5
        ...
    }
}

should start off with 5 worker-threads and 1 regular thread (not 5 worker threads and 15 regular threads that often end up being unused).

I added some tests to ensure the current num_threads logic does not change

@dunglas dunglas merged commit cc473ee into main Mar 19, 2025
56 checks passed
@dunglas dunglas deleted the fix/thread-calculation branch March 19, 2025 12:21
@dunglas
Copy link
Copy Markdown
Member

dunglas commented Mar 19, 2025

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants