SShortSingh.
Back to feed

Solon Framework Auto-Tunes Thread Pools at Runtime Using CPU Core Count

0
·1 views

Solon, a Java application framework, sets its HTTP server thread-pool properties to zero by default, meaning the system automatically calculates optimal values based on the host machine's actual CPU core count at runtime. The auto-tuner uses a single key flag, server.http.ioBound, to determine whether a workload is IO-bound or CPU-bound, then applies different scaling formulas accordingly. For IO-bound services, maxThreads is set to 32 times the core thread count, while CPU-bound services use a leaner multiplier of 8 to avoid unnecessary context-switching overhead. This approach eliminates the common problem of hard-coded or copy-pasted thread-pool values that may have been tuned for a different server environment. Developers can still override individual settings in app.yml, but the zero-config defaults are designed to remain suitable for most deployments without manual intervention.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer ports mustache.js to Rust in 72 hours, achieving 30x faster template rendering

Software developer Gargee Bhattacharjee built jugaad-mustache, a Rust port of the popular mustache.js templating engine, during the Port Mortem 2026 hackathon (Track F). The resulting binary compiles to roughly 2MB and executes in 5ms, compared to mustache.js which requires a 45MB Node.js runtime and takes around 150ms to start. The project enforces 100% memory safety by forbidding unsafe code, and includes a custom truthiness evaluator to replicate JavaScript's implicit type-coercion behavior in Rust. A standout feature called Jugaad Mode — inspired by the Indian concept of frugal problem-solving — auto-repairs malformed templates instead of crashing. Behavioral equivalence with mustache.js was verified through an automated fuzzer that ran 30,567 test iterations and found zero output differences between the two engines.

0
ProgrammingDEV Community ·

Developer Builds Two-Stage Local AI Pre-Commit Hook to Cut Secret Scanning Noise

A developer created a pre-commit hook that combines regex scanning with a locally run large language model to improve secret detection in code repositories. The tool first applies broad regex patterns to flag suspicious strings in staged files, then passes only those flagged hunks to a local LLM via Ollama for a final verdict. Because the model runs entirely on the developer's own machine, no code or diffs are sent to external cloud services. The system distinguishes real credentials from placeholders and test fixtures, reducing both false positives that frustrate developers and false negatives that let real secrets slip through. Most commits bypass the slower LLM stage entirely, keeping the hook fast for everyday use.

0
ProgrammingDEV Community ·

How Experienced Engineers Decide When to Use a Queue in System Design

A DEV Community article argues that recognizing when to use a Queue is a more valuable engineering skill than simply knowing how one works. The core decision framework starts with a business question: does the user need the result immediately, or can the work happen in the background? Tasks like saving a form submission must stay in the request path, while work such as generating reports, sending notifications, or updating search indexes are strong candidates for asynchronous Queue-based processing. Engineers are advised to sketch the request flow first and let business requirements — not data structures — drive design choices. The article also notes that certain requirement phrases, including 'export data' or 'process image,' serve as signals to evaluate whether a task truly needs to block the user.

0
ProgrammingDEV Community ·

Developer launches free browser-based text case converter supporting 11 formats

A developer has built TextCaseConverters.com, a free online tool that converts text into over 11 formats including camelCase, snake_case, kebab-case, and UPPERCASE. The tool was created to eliminate the friction of switching between multiple apps during everyday development workflows. All conversions run locally in the browser using JavaScript, meaning no text is sent to external servers. Built with Next.js, TypeScript, and Tailwind CSS v4, the site is hosted on Cloudflare Pages and requires no signup to use.

Solon Framework Auto-Tunes Thread Pools at Runtime Using CPU Core Count · ShortSingh