SRL Archive - OSR Help

Setting memory of SMART clients?


purerange86

2014-11-30 18:56:56

Is there a way to reduce or limit the amount of CPU each SMART client uses, either through game settings in OSRS or a Simba function? I have already optimized using the FPS slider and using less CPU-intensive scripting methods.

I remember back in the old days people would use the following cmd to start up a client that would have a smaller heap size. There any way to do a similar thing through a function in Simba, or start up a SMART client like this?

@echo off
java -jar -Xmx256m XXBot*.jar
pause

I currently can only open 4-5 clients (without scripts) before I hit 100% CPU (8GB ram) whereas on certain other clients I can open 10 or more (and specify a heap)

Thanks!

KeepBotting

2014-11-30 20:22:27

@Brandon;

NKN

2014-11-30 20:45:47

You seem to be confusing RAM and CPU.

Turpinator

2014-11-30 20:50:58

If you wanbt to adjust the memory size, youre going to want to check out smartparams.simba. specifically here…. https://github.com/SRL/SRL-OSR/blob/c161def68f214296620103fa8fe7a1ea875562e1/SRL/misc/SmartParams.simba#L161

Or something. idk. I might be drunk and not know what im talking about.

Justin

2014-11-30 22:00:54

From: Turpinator
If you wanbt to adjust the memory size, youre going to want to check out smartparams.simba. specifically here…. https://github.com/SRL/SRL-OSR/blob/c161def68f214296620103fa8fe7a1ea875562e1/SRL/misc/SmartParams.simba#L161

Or something. idk. I might be drunk and not know what im talking about.


Posting Under the Influence:
It is not allowed to post in any section outside the off-topic category when intoxicated or under severe influence of drugs.

Brandon

2014-11-30 23:38:16

SmartSpawnClient('java.exe', replaceWrap(PluginPath, '\', '/', [rfReplaceAll]), params[0], params[1], 765, 503, '', '', '-XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=30', '');

That parameter (second to last parameter for the above function) is arguments to the JVM. You can add or remove arguments there.

I'd use the MinHeapFree, MaxHeapFree arguments as shown above.. You can mess around with the arguments and see what suits you best..


The default arguments (view page source: http://oldschool93.runescape.com/j1 – near line 141 – java_arguments) that would be passed to the JVM (for RS in the browser) are:


-Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC;

purerange86

2014-12-01 00:23:49

Thanks to all for help!
D