Categoria

Pagina 1 di 4

Performance: prestazioni misurate, con i numeri

Ottimizzare senza misurare è tirare a indovinare. Prima di toccare una riga bisogna sapere dove sta davvero il collo di bottiglia: quasi mai è dove il team pensa che sia, e quasi sempre costa molto meno di un rewrite o di un server più grande. In questa categoria la performance è un metodo.

Gran parte degli articoli riguarda la performance applicativa, che quasi sempre significa accesso ai dati: query lente ed Eloquent N+1, caching a più livelli con Redis usato dove serve, code e worker per togliere il lavoro pesante dal percorso della richiesta, e le leve del runtime come OPcache, PHP-FPM e i fibers. In ogni caso si misura il traffico reale, si trova il punto lento e si interviene lì.

Altri trattano la performance di sistema, spesso ignorata finché non esplode: RAM e swap su VPS modesti, cron che si pestano i piedi a vicenda, spazio disco che si satura e ferma il servizio, sessioni PHP che affondano un portale nelle ore di punta. Sono problemi invisibili nel codice che però fermano l'azienda, e si risolvono con una diagnosi prima di comprare hardware d'impulso.

Se un'applicazione o un server rallentano, vedi la consulenza IT e DevOps o scrivimi.

Prima di ottimizzare si misura, e dopo ogni modifica si misura di nuovo.

MTP speculative decoding in llama.cpp, faster but not identical

MTP speculative decoding in llama.cpp, faster but not identical Some recent GGUF files ship with a multi-token prediction head that llama.cpp can use as a built-in draft model. On Qwen3.8-27B it lifted decoding on code from 29.3 to 56.8 tokens per second, every single problem faster, for about 1.3 GB of extra VRAM. What the release notes do not say is that the answers change: at temperature zero only 7 of 50 were identical with and without the head, while the number of correct answers stayed the same. Speculation here is fast, not neutral. Continua a leggere
Ultima modifica:

Ternary-Bonsai-2-27B vs Qwen3.8-27B on a 16GB RTX 5060 Ti

Ternary-Bonsai-2-27B vs Qwen3.8-27B on a 16GB RTX 5060 Ti Ternary-Bonsai-2-27B is Qwen3.8-27B with its weights reduced to three values, packed at 1.75 or 2.13 bits per weight, and it needs a fork of llama.cpp to run. On a 16GB card the result is striking on size and speed: a 27B model in six to seven gigabytes that decodes almost twice as fast as the 4-bit build. On 134 deterministic items it passed 105 and 107 against 113 for the conventional quants, a gap that this comparison cannot test, for a reason worth understanding. Continua a leggere
Ultima modifica:

Qwen3.6-35B-A3B vs Ornith-1.5-35B-A3B on a 16GB RTX 5060 Ti

Qwen3.6-35B-A3B vs Ornith-1.5-35B-A3B on a 16GB RTX 5060 Ti The 35B-A3B shape, 35 billion parameters with about three billion active per token, is the sweet spot of a 16GB card, and two models compete for it. At the same IQ3_XXS quantization, Qwen3.6-35B-A3B and Ornith-1.5-35B-A3B tie overall on 134 deterministic items, but not in every category: Qwen follows precise instructions in eight cases where Ornith fails, and Ornith is better at arithmetic. Ornith decodes 19% faster, and Qwen loses more ground in Italian. Continua a leggere
Ultima modifica:

Ornith-1.5-35B-A3B vs Ornith-1.5-9B on a 16GB RTX 5060 Ti

Ornith-1.5-35B-A3B vs Ornith-1.5-9B on a 16GB RTX 5060 Ti The Ornith 1.5 family offers a dense 9B and a 35B mixture of experts with about three billion active parameters, and on a 16GB card the MoE is both bigger and faster. With reasoning on it solved 26 Python problems out of 50 within five minutes against 10 for the 9B, a difference confirmed by a paired test, and it answered sooner on every probe. The 9B keeps two real advantages: half the VRAM and a context about twice as long as the MoE can load. Continua a leggere
Ultima modifica:

Qwen3.8-27B GSQ-RCO vs Qwen3.8-27B IQ4_XS on a 16GB RTX 5060 Ti

Qwen3.8-27B GSQ-RCO vs Qwen3.8-27B IQ4_XS on a 16GB RTX 5060 Ti The GSQ-RCO build of Qwen3.8-27B is a smaller file than the uniform IQ4_XS and comes with a speculative decoding head, so on a 16GB card it is twice as fast and holds twice the context. The question everyone asks next is whether the cheaper quantization costs intelligence. On fifty coding problems it solved 34 against 33, and this measurement cannot tell them apart: the design can only see differences larger than twenty points, and a non-difference is not an equivalence. Continua a leggere
Ultima modifica:

Qwen3.8-27B vs Ornith-1.5-35B-A3B on a 16GB RTX 5060 Ti

Qwen3.8-27B vs Ornith-1.5-35B-A3B on a 16GB RTX 5060 Ti These are the two models I serve every day on a 16GB card, and they are not ranked by a single number. Without reasoning the dense Qwen3.8-27B solves 34 Python problems out of 50 against 19 for the Ornith 35B mixture of experts. With reasoning on and five minutes per problem the order flips, 26 to 12, because the MoE thinks at twice the speed. On real bug fixes the 27B delivered fifteen correct fixes out of fifteen, and the MoE answers four to fourteen times sooner when both are thinking. Continua a leggere
Ultima modifica:

The reasoning tax on a local LLM, measured on a 16GB-VRAM GPU

The reasoning tax on a local LLM, measured on a 16GB-VRAM GPU Turning on reasoning in a local model is sold as a free upgrade in quality, and on a 16GB card it is neither free nor always an upgrade. On five models the median wait grew between 4.6 and 14 times, a request for one shell command went from three seconds to more than three minutes, and the coding ranking between a dense 27B and a 35B mixture of experts reversed completely. Given twenty minutes, the 27B with reasoning on reached what it solved in thirty seconds without it. Continua a leggere
Ultima modifica:

Recommended technical strategies for local LLMs on a 16GB-VRAM GPU

Recommended technical strategies for local LLMs on a 16GB-VRAM GPU A 16GB consumer card runs a 27B dense model or a 35B mixture of experts only when every server parameter is chosen on purpose. The defaults of llama.cpp are friendly to a first try and hostile to a stable setup: an automatic fit that rewrites what you did not pin, a context budget split across slots, a KV cache pair that silently leaves the fast kernel, and a reasoning mode under which a three-second answer takes three minutes. Continua a leggere
Ultima modifica:

Doctrine ORM in Symfony 7: ottimizzare le query su database di grandi dimensioni

Doctrine ORM in Symfony 7: ottimizzare le query su database di grandi dimensioni Doctrine è comodo finché il database è piccolo; su tabelle grandi le scelte di default costano. Come ottimizzare le query in Symfony 7: controllo dell'hydration, fetch join contro lazy loading, batch processing per le operazioni massive, e quando conviene scendere a SQL nativo senza buttare via la manutenibilità. Pattern da applicazioni con milioni di righe, dove un findAll innocuo saturava la memoria. Continua a leggere
Ultima modifica:

Eloquent ORM avanzato: evitare le query N+1 nei gestionali Laravel

Eloquent ORM avanzato: evitare le query N+1 nei gestionali Laravel Le query N+1 non rompono nulla in sviluppo e affondano la produzione: un gestionale con molte relazioni le genera senza accorgersene. Come individuarle con gli strumenti giusti, l'eager loading fatto bene, e i pattern Eloquent avanzati per tenere il numero di query sotto controllo anche con relazioni annidate. Esempi da gestionali reali, dove una lista innocua generava centinaia di query a ogni caricamento. Continua a leggere
Ultima modifica:

Strumenti utili per la performance

Tool gratuiti a supporto del tuo lavoro:

Minifier HTML/CSS/JS, SQL formatter.