Feature/optimize delphi epoll#477
Merged
viniciussanchez merged 8 commits intoJun 26, 2026
Merged
Conversation
…alloc parser, and writev/sendfile system calls
… compilador delphi linux
…arvation sob 1000 conexoes
… and dynamic client data resolver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 perf(epoll): Otimizações Avançadas de E/S Vetorizada e Pooling Lock-Free (Phase 2)
Esta Pull Request introduz a Phase 2 de otimizações de nível de sistema e gerenciamento de memória para o provedor Epoll no Linux, eliminando contenções de contexto e permitindo que o Horse escale de forma linear sob cargas massivas de conexões simultâneas.
🛠️ O que foi feito?
threadvar):CompareBytesCI):KeyStart,KeyLen, etc.) para catalogar os cabeçalhos diretamente no buffer cru do socket de leitura.writev) e Zero-Copy (sendfile):writevdo Linux.sendfile(overhead de cópia de memória reduzido a zero).TTask.Runno Delphi.MaxWorkerThreads := 2048eMinWorkerThreads := ProcessorCount * 8) para aniquilar o starvation de threads sob rajadas repentinas de novas conexões.📊 Resultados do Benchmark de Carga Extrema
Os testes compararam o provedor padrão (Normal - Indy) contra o provedor assíncrono (Epoll) compilados nativamente com o compilador Delphi Linux64 (
dcclinux64) no Ubuntu Linux 22.04 LTS (via Docker):📈 Gráfico de Throughput (Requisições / Segundo - Mais é melhor)