View Full Version : [VPS] Extreme lag spikes during script
Zee Best
01-24-2012, 03:55 AM
Ok, well, basically i'm trying to run this on my VPS which is not a bad quality one, but, whenever i run the script i usually run on my home computer it starts freezing.
I'm not sure whats causing it, it's not down to the VPS, it's when the script opens the bank or clicks to do an action. It was working flawlessly on my laptop i just would rather not have to leave my laptop on all night.
Anyone have any ideas of what it might be?
EDIT: Ok, the application keeps jumping up to 99% CPU, that's obviously the cause. But is this down to a problem during installation or something? Because i've already reinstalled it a few times to make sure.
Zee Best
01-24-2012, 02:54 PM
No one knows?
Kyle Undefined
01-24-2012, 03:25 PM
Are you using SMART?
weequ
01-24-2012, 04:24 PM
What vps do you have? I have heard that some vps providers are not as good as they promise (overselling).
Zee Best
01-25-2012, 04:29 AM
Are you using SMART?
Yes i'm using smart, but the normal browser one does the same thing.
What vps do you have? I have heard that some vps providers are not as good as they promise (overselling).
I'm using GoDaddy, which isn't a cheap service and provides higher quality than most.
Also, it only occurs when running Simba, if i went on RS normally using it then you don't get the spikes.
____
Hmm, i'm going to check the script i'm using as i had a brainwave, it could be something to do with the custom banking method aswell as the bitmap checking since those are the things that lag it, like, when the bank is clicked and when the spell is clicked.
EDIT AGAIN:
Ok, think i figured out and fixed it. Basically, the writer of the script obviously doesn't know how a loop should work and was essentially checking if something was happening instantly, instead of having a wait between it.
The same as doing;
while (!variable)
doMethod();
Without a thread sleep, therefore it was blocking itself from doing anything until it was checked and causing a lag spike.
Managed to fix it for now, however, i've never programmed with SRL/Scar/Simba so it's probably not efficient, i may learn to do it in the future though.
Harry
01-25-2012, 04:34 AM
GoDaddy, ... isn't a cheap service ... provides higher quality than most.
Lol'd. GoDaddy oversells like mad and has terrible quality.
Any VPS will lag quite a bit, except maybe Xen VPSes (most are OpenVZ).
Zee Best
01-25-2012, 06:57 PM
Lol'd. GoDaddy oversells like mad and has terrible quality.
Any VPS will lag quite a bit, except maybe Xen VPSes (most are OpenVZ).
I used to run 3 or 4 iBot clients at once on a 2GB vps from GoDaddy. It's not lag which is the problem, it's the fact the scripts i've been using don't have sleeps, so, they're calling something instantly which uses all the CPU up.
As in this example would;
void loop()
{
while (true)
{
System.out.println("Running");
}
} That would probably freeze up your computer with a simple commandline output, if you think they're checking images in the same way you see the reason.
Floor66
01-25-2012, 07:02 PM
Exactly -- you should add a safeguard wait/sleep to every loop.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.