Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Idea to increase performance (maybe) #17

Open
LuisFernandob opened this issue Jan 4, 2022 · 1 comment
Open

Idea to increase performance (maybe) #17

LuisFernandob opened this issue Jan 4, 2022 · 1 comment

Comments

@LuisFernandob
Copy link

I'm acctually with 25 servers with 1 petabyte RAM and i noticed that doesnt matter how many more RAM available i have, the money/second seens to increase only due to my hacking level, money available on server and the target security level, so i was wondering, maybe there is a lot more scripts (hacking and growing/weakening) running than what is needed, so here is my ideia, there is a way to know how many hacking/growing scripts are needed for getting all the money available on the server, and then running the needed amount of scripts each X seconds, so we will have a lot of growing/hacking cycles starting and endind each 15 seconds for example?

@wchevalier
Copy link

There is room for improvement for sure. There should never be a time when weaken has over 2000 threads as there is a cap for how high security can be and the amount weaken can do is a constant (-0.05) and both hack/grow have constant increases. In the demo monitor.js script at [https://github.com/bitburner-official/bitburner-scripts] shows how to get the number of threads needed to fully reduce a server for hack/growth/weaken. using those formulae you should have an upper limit to threads used per cycle against a server. Given you now have threads left over there is no need to sleep for the weaken time and instead have another cycle of attacks against the same server moments after the current attacks are completed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants