View Full Version : high cpu.
Jakkle
09-02-2011, 11:24 AM
I have been having this trouble for a while.
I keep getting very high cpu usage after leaving simba running a script over night.
When I start everything I watch it to see if everything is ok and my cpu is at 25% peeks to 38% at times.
If I look back at it after say half hour everything still seems ok, with a slight increase in cpu peeking to 45%.
When I look back at it after waking up the cpu is at 80% hitting 100% (going up and down vigorously).
If I then disable smart and stop the script the cpu usage falls to 50%-60% (simba and smart still running).
So I thought lets check out whats using the cpu, so I used 'Process Explorer' and seen that Simba is what is using the cpu.
Here is the print screen showing Simba properties from clicking simba in Process Explorer and showing that I had stopped the script and logged out plus disabled smart(although you can not see I have done that with this pic :p).
http://img716.imageshack.us/img716/3923/desktop1d.png
Does anyone know what that stuff means in Simba properties box ?
I must say that when closing smart the cpu drops back to 1-2% but when starting the script again smart either don't load up or if it does its really slow and the cpu flies back up to a high%.
If I close Simba and restart everything back up all is fine until I leave it for for a long time again.
I have used different Smart's(V6.6, V6.7.beta and V6.7), Simba's(0.96.RC, 0.97.1 and 0.97.2) and 2 different scripts for the same thing 'Monkfishing'.
I even changed bits within the scripts where I have been getting high peeks of cpu usage to lessen the build up of (leaking of some sort, or what ever it is ?) but still after leaving it on for a few hours it happens no matter what I do.
Can some please help or know what it may be ?
Dervish
09-02-2011, 01:36 PM
Memory leaks is my guess.
Floor66
09-02-2011, 02:44 PM
Yeah, CPU spikes because of a memory leak...
It could still be the WalkPath acting up.
Wizzup?
09-02-2011, 03:26 PM
Memory leaks is my guess.
In Reflection/SMART; most likely. BTW, 280MB memory isn't that bad with SMART (runescape!) open. Are you sure you're not doing something processing intensive? Also, the Simba console might be helpful?
Jakkle
09-02-2011, 04:19 PM
In Reflection/SMART; most likely. BTW, 280MB memory isn't that bad with SMART (runescape!) open. Are you sure you're not doing something processing intensive? Also, the Simba console might be helpful?
All I'm running is simba and smart when I leave it. The pic I took was when the script was not running. When the script is running, loged into runescape, with smart enabled, then the cpu goes from 50% at times up to 100%, not sure about memory taken at that point(I will look into that). I will show what it says in Simba console no problem brb.
Edit: In the Simba console it says,
Field not found: Oc or 0c
All I'm running is simba and smart when I leave it. The pic I took was when the script was not running. When the script is running, loged into runescape, with smart enabled, then the cpu goes from 50% at times up to 100%, not sure about memory taken at that point(I will look into that). I will show what it says in Simba console no problem brb.
Edit: In the Simba console it says,
Field not found: Oc or 0c
hook_interface_GetText = 'Oc';
CPU staying at 50% after script is ended has nothing to do with reflection. Script ends, reflection isn't being used.
GetText error is from random finding functions. We call R_GetMusic and sometimes it doesn't find it.
Jakkle
09-03-2011, 02:12 AM
Just to say I ain't pointing at anything. I did this thread for answers and to hopefully point something out that could be fixed.
So what are you saying then mormonman, it's not reflection ?
What do you think is causing this ?
Wizzup?
09-03-2011, 10:27 AM
The thing is that you said, when you closed SMART, CPU went back to normal. That means it is not Simba's doing; and that it is either a problem in SMART, _or_ the programs interfacing with SMART:
I must say that when closing smart the cpu drops back to 1-2% but when starting the script again smart either don't load up or if it does its really slow and the cpu flies back up to a high%.
Hope this explains a bit. :)
E: Plus, field not found probably means you're not using Reflection 100% properly.
Flight
09-03-2011, 10:53 AM
E: Plus, field not found probably means you're not using Reflection 100% properly.
Actually, this is a problem with Reflection AntiRandoms. Like mormonman stated, they're detected through their music (reflection text).
We call R_GetMusic and sometimes it doesn't find it.
I'll bet 90% of any reflection script, if they're being flooded with "Field not found", it's because of how rapidly they're calling "R_FindRandoms". I cut back on this and limited it to search for randoms only when necessary, and that seemed to do the trick.
Jakkle
09-03-2011, 09:51 PM
The thing is that you said, when you closed SMART, CPU went back to normal. That means it is not Simba's doing; and that it is either a problem in SMART, _or_ the programs interfacing with SMART:
Hope this explains a bit. :)
E: Plus, field not found probably means you're not using Reflection 100% properly.
Yeah but I also said this
If I close Simba and restart everything back up all is fine until I leave it for for a long time again.
Basically I was saying that yeah the cpu goes down but yet If I 'start script' again without closing simba the cpu goes very high again but if I close simba everything is fine for the first hour or 2(slowly increasing over time).
@ Flight, I have been using your monkfishies script and I didn't have this problem when first using it. Left it over night with no problems when waking up. Infact if you remeber I posted a 30+ hour proggy.
There is one thing I can kind think of but I'm not sure if this would cause any problems.
I got Shuttleu's copy of simba off of him on irc. Not knowing at the time his vesion was installed on a 64bit computer where mine is only 32. I opened simba to see if I had the same problem with his copy as I did with mine, I ran a script and smart opened, checked and still had the same problem anyway :(
Could that of effected my computer in any way ?
superuser
09-03-2011, 09:54 PM
I have this exact same issue. I'm 99% sure the issue is in R2. There is no problems whatsoever with R1. Only scripts with R2 gets slower and slower as they run.
Jakkle
09-03-2011, 09:57 PM
I have this exact same issue. I'm 99% sure the issue is in R2. There is no problems whatsoever with R1. Only scripts with R2 gets slower and slower as they run.
Wow, someone else with this problem :D I was thinking that its R2 but I think its within the last 3 weeks or so.
Edit: The reason why I ain't to sure what it is, is because there has been updates in all Ref, simba and smart.
What npc/object/item/player functions does the monkfish script use?
Flight
09-03-2011, 11:58 PM
I have this exact same issue. I'm 99% sure the issue is in R2. There is no problems whatsoever with R1. Only scripts with R2 gets slower and slower as they run.
I have the exact same issue. My probably isn't related to the OP, but exactly to yours. The script will run just fine, but over time everything will slow down, and I noticed it's not just the script, it's SMART itself.
Try this: When your script starts running really slow just stop it. Now try adjusting the FPS bar on the right side of SMART. See how slow it is to move, and how it's lagging far behind your mouse movement?
I didn't have this problem until only recently in one of the newer R2 versions. I'm sorry, but I don't remember which rev it was that triggers this problem.
Fixed a small leak in gametabs.
Flight
09-04-2011, 12:59 AM
What npc/object/item/player functions does the monkfish script use?
I'm testing this as we speak. I have a feeling it lies with NPCs, and Pyroryan brought up a good point about interfaces as well.
Edit:
Monkfishies uses a little bit of NPCs but constantly searches for items (interfaces).
I'm testing this as we speak. I have a feeling it lies with NPCs, and Pyroryan brought up a good point about interfaces as well.
Edit:
Monkfishies uses a little bit of NPCs but constantly searches for items (interfaces).
The gametab fix was from R_CurrentGameTab and it leaked 15 interface references everytime it was called.
Harry
09-04-2011, 01:41 AM
I also get much more CPU use with Ref2 than I did with Ref1.
It's nothing unbearable, but it's a shame that I can only run ~3 clients before I start to lag (each Simba using ~33% CPU each) when I used to be able to run up to 6 at a time with minimal issues.
I also get much more CPU use with Ref2 than I did with Ref1.
It's nothing unbearable, but it's a shame that I can only run ~3 clients before I start to lag (each Simba using ~33% CPU each) when I used to be able to run up to 6 at a time with minimal issues.
I believe that has to do with wait times in loops. I'll look into that as well.
I've noticed this in one of the recent commits to Ref2. It started at commit 117cf6c (https://github.com/Drags111/Reflection_Dev/commit/5523c8bb414c9515b9442cfeb1eae3ba8381adb9) for me which made my computer barely usable after starting up 4 simba's. I reverted back to commit 817984d (https://github.com/Drags111/Reflection_Dev/commit/0712a81fdff9ad72f3e5f1d933b6deae483f9367) and I'm running 7 simba's at an average of 60% CPU.
So for me this has only recently become a problem. I'll download the latest commit later and see if the issue is resolved.
I've noticed this in one of the recent commits to Ref2. It started at commit 117cf6c (https://github.com/Drags111/Reflection_Dev/commit/5523c8bb414c9515b9442cfeb1eae3ba8381adb9) for me which made my computer barely usable after starting up 4 simba's. I reverted back to commit 817984d (https://github.com/Drags111/Reflection_Dev/commit/0712a81fdff9ad72f3e5f1d933b6deae483f9367) and I'm running 7 simba's at an average of 60% CPU.
So for me this has only recently become a problem. I'll download the latest commit later and see if the issue is resolved.
What scripts?
Edit: that was the update that added the leak to every call of R_GameTab.
What scripts?
Edit: that was the update that added the leak to every call of R_GameTab.
A private script I made. It uses R_WindWalk, R_TileOnMM, R_FindObject, R_FindRandoms, R_GetAnimation, R_SelfInBox.
I'll test the latest commit you added now and report back.
EDIT: Latest commit is a lot better. Looks like the problem was to do with the update to R_GameTab
grats
09-04-2011, 04:12 AM
In Reflection/SMART; most likely. BTW, 280MB memory isn't that bad with SMART (runescape!) open. Are you sure you're not doing something processing intensive? Also, the Simba console might be helpful?
280MB is usually less than what it's using when I'm running any random script in simba, runescape just uses a lot.. I've seen that runescape has memory leaks especially when you're running across the map it'll just keep everything in memory for a long time (hours) then all the sudden it loses 100MB lol
Wizzup?
09-04-2011, 10:23 AM
280MB is usually less than what it's using when I'm running any random script in simba, runescape just uses a lot.. I've seen that runescape has memory leaks especially when you're running across the map it'll just keep everything in memory for a long time (hours) then all the sudden it loses 100MB lol
Yeah, the JVM Garbage Collector can do that. ;)
E: Mormonman, perhaps it is still worthwhile to integrate that memory debugger thing I wrote for R1 at some point?
Flight
09-04-2011, 10:55 AM
Yeah, the JVM Garbage Collector can do that. ;)
Well atleast it's called at some point. I think this is a problem we had in the early days of Private Servers.
Also, Mormonman, your GameTab patch seems to be doing the trick. I ran a script that intensively uses this (and normal invokes SMART to lag all together) and it's worked smoothly, constantly the same speed for 2 hours. I'm guessing that was the majority of the problem, if not all.
Yeah, the JVM Garbage Collector can do that. ;)
E: Mormonman, perhaps it is still worthwhile to integrate that memory debugger thing I wrote for R1 at some point?
I'm thinking that would be smart.
Jakkle
09-04-2011, 01:51 PM
Well so far so good :) I'm glad it seems to be sorted. Thanks everyone for replying with your opinions and feedback. I will report back later as I'm going to leave it on for a while now and see what happens when I get back to it. <3 you all thanks once again everyone
superuser
09-04-2011, 02:11 PM
Almost solved for me :) Now the scripts doesn't slow down, but Simba crashes after a awhile with the following in debug box:
FALAL ERROR in native method: Bad global or local ref passed to JNI
Any ideas?
Flight
09-04-2011, 02:16 PM
Almost solved for me :) Now the scripts doesn't slow down, but Simba crashes after a awhile with the following in debug box:
Any ideas?
I used to get that in crashes as well, I'm clueless.
superuser
09-04-2011, 02:24 PM
Well now I'm 99% sure it's a bug in SMART :)
Jakkle
09-04-2011, 03:40 PM
After 2 hours things are still the same cpu wise, not gone up. So you've solved the leek, now to find the root to the error superuser was talking about :p plus I still get the paster error message in simba debug
superuser
09-05-2011, 06:29 AM
I noticed that this bad global or local ref passed to JNI -error occurs when SMART has graphics disabled. When enabled, this doesn't happen. This has something to do with EventNazi.java...
Harry
09-05-2011, 07:16 AM
bad global or local ref passed to JNI -error occurs when SMART has graphics disabled. When enabled, this doesn't happen
This has happened to me with graphics enabled. You might be partially correct though, maybe it's being called while the image is refreshing?
tarajunky
09-07-2011, 03:30 AM
I updated both SMART and Ref2 at the same time, and ever since then all the Ref2 scripts I have tried run like garbage. They are very unresponsive within minutes of starting them, and I have to enable/disable SMART many more times before I'm able to type.
No disrespect intended to Ben or the Reflection devs, but it used to be rock solid for a very long time before that, so in my experience this has been a big step backward.
Flight
09-07-2011, 04:12 AM
I updated both SMART and Ref2 at the same time, and ever since then all the Ref2 scripts I have tried run like garbage. They are very unresponsive within minutes of starting them, and I have to enable/disable SMART many more times before I'm able to type.
No disrespect intended to Ben or the Reflection devs, but it used to be rock solid for a very long time before that, so in my experience this has been a big step backward.
Is it something that just recently started? Maybe your gametab hasn't been patched yet and is still causing the memory leak, which should be slowing down both your scripts and SMART itself within a matter of minutes.
grats
09-07-2011, 04:43 AM
http://i.imgur.com/J6pEl.jpg
http://i.imgur.com/3ftwq.jpg
I think that is quite a bit for two cores.. back a few months ago, these things used to run fine on single cores and sit around maybe 40% usage
now it stays steady above 60%
I don't even have virus protector or anything on these VM's, nothing except simba / smart running and some background shit for XP, only 25 processes
it runs super smooth, yea, I never see any problems.. the machine it runs on has 8 cores (the virtual machine just allows 2) and it looks like it splits the load between the 2 cores of the vm to 4 cores of the actual machine, so it really has zero lag ever
but I don't see any memory leaks at all, and I don't see why it uses so much cpu..
running the strong holder 1.9 on that machine, but every R2 script seems to be using that much cpu
whatev
09-07-2011, 07:43 AM
Not gonna read thread. I have the same issue though. Guessing R2 has a few memory leaks.
I'll bookmark this and post more later.
bevardis
09-07-2011, 01:36 PM
Smart takes quite some memory even without smart (runescape);o
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.