High memory allocation using SshCommand
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- csharp
- Ambito
- networking
Direzione di ricerca
Inizia dall’implementazione di SshCommand e analizza come vengono allocati e consumati i relativi flussi di output, utilizzando lo snapshot della memoria segnalato come riferimento. Determina quale comportamento dovrebbe cambiare per i comandi il cui output non viene monitorato, quindi verifica che i comandi di lunga durata non conservino più un output senza limiti e che lo scenario previsto sia coperto dai test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
I noticed using SSH.Net there are a few issues using SshCommand:
- Allocation of 2kB of buffer for every command, even short ones without output and without monitoring output
- Not reading output causes these buffers to grow indefinitely for long running commands
- No way to discard this output easily
- Using sshcommands many at a time in a pool causes huge GC pressure with the many large allocations
An example from a single command running without cleaning the streams shows it allocating over 300kB of memory in a VS snapshot.
Possible solutions:
- Allocate the pipestreams only when accessed, discarding input otherwise (breaking change)
- Creating a new sshcommand that does not allocate.
I will be creating a pull request for scenario 2 as i need a solution for a project asap.
Thanks for the library!
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 993
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sshnet/SSH.NET
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
ShellStream.Expect over-discards on undecodable bytes, driving ArrayBuffer.ActiveLength negativeAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Using SshClient on Linux under Wine throws System.Security.Cryptography.CryptographicExceptionAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
Tutte le issue di sshnet/SSH.NET
Issue simili
-
ci-failure-cause test-failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
area:frontend bug FE hotspot:css mvp P3
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
klasolsson81/jobbliggaren#1856 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: App+Library Build
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Aaronontheweb/freshdesk-cli#148 ·