Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

optimizing for ram and cpu for a serious farm

Featured Replies

For farming

https://osbot.org/forum/topic/127346-osbot-memory-usage/

 

Alek talked about max heap size

If I want to limit the heap size, are there any recommended levels?

Alternatively, it's pretty easy to upgrade my ram to like 250GB but I'm stuck at 24mb of cache regardless of cpu upgrades. Is there a way to increase my heap size and reduce my garbage collection?

I'm planning on removing webwalking from my scripts entirely and replacing it with path. Webwalking seems to use too much ram for a serious farm

Is there a way to run multiple bots in one cli? That way I don't need multiple separate instances of osbot open (I'm assuming this will use more ram)

I realize I tried to do way too much with one script and will now segment it into multiple small scripts that are as tiny as possible, with only one if/then case handling logic in the main loop and only a few if/then conditions per script. The complex script executes fine but at scale seems to be unnecessarily large and likely is hogging more cpu and ram than need be. The logic for handling progressions or changes in the script seems better suited by just exiting the script at the point it should change and starting a new script

I am already using the nointerfaces and low cpu cli commands

What are some recommended refactoring tips for scripts to minimize ram and cpu usage? Any way I can check to see how big the heap should be with my script? I think I'm thinking of using a memory debugger

 

I read looping more slowly can reduce usage also? How to reduce the loop to once per minute?

Edited by BigCahunaBurger

  • Author

actually to be honest - I think RAM is fine. I probably want to prioritize high ram and low GC. My cpu is probably going to be the bottleneck, I can get up to like 250gb of ram but I'll be bottlenecking with like 24mb of l3 cache

  • Author

OK, I think I figured out one of the biggest problems here for overuse of the CPU. I was using recursive logic. I'm honestly more of a LISP than a Java guy. I didn't realize that recursion is totally discouraged in Java. I can use it in Clojure and possibly export the clojure jar to osbot, but that is unnecessary work at this level

  • Author

Making stuff static should mean it won't be garbage collected, which should reduce CPU utilization. I'll compare and contrast. I think pathwalking (not webwalking), preventing unnecessary looping (ensuring the main loop does not re-execute prematurely) combined with static variables / objects should reduce the CPU a lot.

  • Author
24 minutes ago, Chris said:


yes make a batch script: https://www.howtogeek.com/263177/how-to-write-a-batch-script-on-windows/

cli will open multiple clients

Thanks Chris, I guess what I'm wondering though is whether you can use the -bot parameter for more than one bot? (So one client for many bots)

 

Like

java -jar osbot.jar -bot user1:pass1 user2:pass2 user3:pass3 etc

 

RIP to Zyzz king

18 minutes ago, BigCahunaBurger said:

Thanks Chris, I guess what I'm wondering though is whether you can use the -bot parameter for more than one bot? (So one client for many bots)

RIP to Zyzz king

I believe currently its 1 bot per client. you could ask @Patrick
f7cdc219b5dc433d49b64c8be73fc7cf.png

 

Quote

 

Like

java -jar osbot.jar -bot user1:pass1 user2:pass2 user3:pass3 etc

 

correct. you would add a timeout of 5s or so and make a new line for each java -jar line.

 

  • Author
21 minutes ago, Chris said:

I believe currently its 1 bot per client. you could ask @Patrick
f7cdc219b5dc433d49b64c8be73fc7cf.png

 

correct. you would add a timeout of 5s or so and make a new line for each java -jar line.

 

Thanks Chris

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.