Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS config custom clone #264

Merged
merged 1 commit into from Mar 5, 2024
Merged

TLS config custom clone #264

merged 1 commit into from Mar 5, 2024

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Feb 26, 2024

Apparently when CPU cores are all busy with threads the gc cycles are planned but not executed, so the memory occupation showed in pprof is low, but the virtual memory pages aren't marked yet as MADV_FREE_REUSABLE (osx) until the cycle happens and the OS can't reclaim them.
Reducing CPU consumption allowed the cycles to happen more frequently:
Before (nuclei)

$ /usr/bin/time -a -p -h go run . -mhe 99999999999999999 -itags high,critical -etags dns -jsc 110 -rl 0  -l target.txt -duc -rl 0
...
[INF] Targets loaded for current scan: 10000
[INF] Templates clustered: 1270 (Reduced 12380000 Requests)
[INF] Using Interactsh Server: oast.site
...

After (nuclei):

$ /usr/bin/time -a -p -h go run . -mhe 99999999999999999 -itags high,critical -etags dns -jsc 110 -rl 0  -l target.txt -duc -rl 0
...
gc 80 @42.776s 5%: 0.19+250+0.089 ms clock, 1.5+127/496/0+0.71 ms cpu, 315->370->185 MB, 371 MB goal, 0 MB stacks, 1 MB globals, 8 P
gc 81 @43.313s 5%: 0.24+152+0.12 ms clock, 1.9+4.5/268/0+1.0 ms cpu, 316->379->192 MB, 371 MB goal, 0 MB stacks, 1 MB globals, 8 P
gc 82 @43.709s 5%: 0.20+147+0.067 ms clock, 1.6+5.1/285/0+0.54 ms cpu, 329->386->187 MB, 386 MB goal, 0 MB stacks, 1 MB globals, 8 P

@Mzack9999 Mzack9999 added the Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity. label Feb 26, 2024
@Mzack9999 Mzack9999 self-assigned this Feb 26, 2024
@Mzack9999 Mzack9999 marked this pull request as ready for review March 5, 2024 00:35
@Mzack9999 Mzack9999 merged commit bc3dccb into main Mar 5, 2024
5 checks passed
@Mzack9999 Mzack9999 deleted the maint-reducing-allocations branch March 5, 2024 00:35
@Mzack9999 Mzack9999 linked an issue Mar 6, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement custom TLSConfig.Clone(...)
1 participant