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

Ways to optimise memory usage? #1474

Open
felipewarrener opened this issue Jun 18, 2024 · 1 comment
Open

Ways to optimise memory usage? #1474

felipewarrener opened this issue Jun 18, 2024 · 1 comment
Labels
question Further information is requested

Comments

@felipewarrener
Copy link

I woke up to my instance of bbot being killed after reaching ~9GB of memory usage:

[INFO] playful_howard: Events produced so far: DNS_NAME: 268356, IP_ADDRESS: 22462, TECHNOLOGY: 6000, ORG_STUB: 5649, FINDING: 436, STORAGE_BUCKET: 6, SCAN: 1
[INFO] playful_howard: 1 events in queue (DNS_NAME: 1)
Killed

root@localhost:~/blah-again/bbot# dmesg -T | rg -i kill
[Tue Jun 18 06:04:27 2024] systemd-resolve invoked oom-killer: gfp_mask=0x1100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
[Tue Jun 18 06:04:27 2024]  oom_kill_process.cold+0xb/0x10
[Tue Jun 18 06:04:27 2024] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=systemd-resolved.service,mems_allowed=0,global_oom,task_memcg=/user.slice/user-0.slice/session-3.scope,task=bbot,pid=122557,uid=0
[Tue Jun 18 06:04:27 2024] Out of memory: Killed process 122557 (bbot) total-vm:9830984kB, anon-rss:7318860kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:15716kB oom_score_adj:0

Are there any flags where I can get memory to be free'd and results written to disk more frequently or something? This was with a list of 12,000 seed domains.

@TheTechromancer
Copy link
Collaborator

According to your output, there was only 1 event in queue at the time it was killed. Without seeing your debug.log, we can't know the cause for sure. However, it's likely it's the massdns module. Massdns needs to keep track of its mutations in order to keep from trying the same ones again. This has already been fixed in BBOT 2.0 through the use of a bloom filter.

I have to ask, are these 12000 domains related in any way? I.e. do they belong to the same parent company?

@TheTechromancer TheTechromancer added the question Further information is requested label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants