mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
mIRC taking up far too much cpu power #173778 30/03/07 12:11 AM
Joined: Mar 2007
Posts: 4
J
Jedisbar Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Mar 2007
Posts: 4
I run two copies of mirc, both in seperate folders and neither reading anything from the others files, and have yet to have an issue with it.

I run 1024 mb ram, 3ghz pentium 4, and mirc.exe is taking up anywhere from 30-40% of the processor, each. This is only recent, and I don't think it's my windows install going coruppt; There's serious system lag, and I did a reinstall of both mirc and windows to make sure.

One of the copies is a bot so I checked if I'd somehow started a loop, timer, etc automation I shouldn't off and it all works out, same with my other instance(the non-bot one).

Anyone have any ideas? All help greatly apprciated.

Re: mIRC taking up far too much cpu power [Re: Jedisbar] #173809 30/03/07 08:15 PM
Joined: Mar 2007
Posts: 60
S
Spitfire3292 Offline
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
Heh. The same thing has been happening to me lately. It might be because I am usually on 65+ channels over 1 network and a lot of people using commands might take up a bit CPU especially if most of your scripts are sockets. About 2X a day my bot's mIRC locks up while minimized and the bot's ping Timeout. This means I must end the process manually and re-boot mIRC. Does anybody have any solutions to this because I think it would help me and Jedisbar greatly smile


"In order to succeed, your desire for success should be greater than your fear of failure."
Re: mIRC taking up far too much cpu power [Re: Jedisbar] #173816 30/03/07 09:48 PM
Joined: May 2005
Posts: 7
H
HyperBlasT Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
H
Joined: May 2005
Posts: 7
omg
I've got the same problem,
I run 1024mb ram and pentuim 4 too, and the mIRC still takes
too much from my CPU power
and like you I always think its cuz of the timers, loops and shit
but i cant find an answer.
I'm joining to the question


"A wasted day, is a day you didn't laugh in."
www.FunScripT.2ya.Co.iL
Re: mIRC taking up far too much cpu power [Re: HyperBlasT] #173832 31/03/07 12:32 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
First thing you should do, is see if the same thing happens with no scripts loaded.
If the problem doesn't show up, then keep trying it, using one script at a time until it reappears. NOTE: It'd be best to check each script one at a time (ie:load one, test it, if the problem doesn't occur, unload the script, load the 2nd, etc.)

If the problem reappears doing it like that, then the script that you just loaded is part (if not all) of the problem.
If it doesn't show up, then try loading various sets of scripts (ie:1 & 2, 1 & 3, 1 & 4, 2 & 3, 2 & 4, 3 & 4,...)

Just keep trying various combinations until the problem reappears.
Once the problem reappears, then we (should) have an idea as to which script(s) is/are causing the problem and we can review the script and see if it can be improved (odds are, if a script is causing that much usage, then it can be improved)

Re: mIRC taking up far too much cpu power [Re: Spitfire3292] #173833 31/03/07 12:36 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Specifically for you, check your socket scripts to ensure that the sockets are open for the smallest amount of time possible.
Next, consider reducing the number of channels that you're on, or possibly set up a second/third installation of mIRC to handle some channels.
Thirdly, consider adding restraints so that you don't get (for example) 50 people sending the same command at the same time.

Re: mIRC taking up far too much cpu power [Re: RusselB] #173888 31/03/07 05:40 PM
Joined: Mar 2007
Posts: 60
S
Spitfire3292 Offline
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
I do have a flood protection script that ignores a user if they post 3 lines in 5 seconds. I will check on the socket scripts, though. Thanks a lot!


"In order to succeed, your desire for success should be greater than your fear of failure."
Re: mIRC taking up far too much cpu power [Re: RusselB] #173972 01/04/07 12:46 PM
Joined: Mar 2007
Posts: 4
J
Jedisbar Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Mar 2007
Posts: 4
Loaded up my client version, unloaded all scripts and restarted it. Same problem, seems worse now with 50% useage. Made a fresh, completely untouched by anything install... same problem.

Re: mIRC taking up far too much cpu power [Re: Jedisbar] #173985 01/04/07 02:58 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just to test, try temporarily disabling your firewall and antivirus/antispyware/antitrojan software and run mIRC. See if the CPU usage is still high. Once you know, you can enable those again. As long as you're not using the web and don't type weird stuff in mIRC that people may tell you to write, you don't need to worry about disabling those temporarily.

Also, when does the CPU usage go up? Is it when mIRC's running, but not connected? Is it when it's connected to multiple channels, or just one? Is it while sending or receiving files? More specific information would help. I run 2 copies of mIRC. My bot uses 0% cpu at all times, and Invision uses 3-5% due to a lot of hash tables (something I still need to try and cut down at some point).


Invision Support
#Invision on irc.irchighway.net
Re: mIRC taking up far too much cpu power [Re: Riamus2] #174013 01/04/07 07:10 PM
Joined: Mar 2007
Posts: 4
J
Jedisbar Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Mar 2007
Posts: 4
Already done the anti-virii step, no effect.

Clients on 2 servers, multi channels each, bot's on 2 of the same, same channels I'm already in. I haven't got a clue what the trigger is, sometimes it's that large from the word go, sometimes it takes a few minutes to kick in, sometimes hours. I am beginning to suspect mircstats may be part of the problem, since that's begun to hang but I'm not sure if that's a cause or an effect of this, I haven't changed a setting on any of this and it just started happening.

Re: mIRC taking up far too much cpu power [Re: Jedisbar] #174019 01/04/07 07:33 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
I am curious if you use hash tables. How many hash tables do you use, what is the size vs. amount used.

Also, what dll's do you use.

Re: mIRC taking up far too much cpu power [Re: Jedisbar] #174028 01/04/07 08:19 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I know a person on Maximum-IRC that runs mircstats, but I don't know if he's run into these problems or not. I'll ask next time I see him.

Re: mIRC taking up far too much cpu power [Re: DJ_Sol] #174032 01/04/07 08:42 PM
Joined: Mar 2007
Posts: 60
S
Spitfire3292 Offline
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
I have several hash tables. My seen.hsh is almost 5 megs worth of data, may that be a problem. All the other hash tables are fairly small. I dont use any DLL's on my bots mIRC excepct Open SSL where the DLL isnt even in the folder.

Also the sockets arent the problem. I tested each one.


"In order to succeed, your desire for success should be greater than your fear of failure."
Re: mIRC taking up far too much cpu power [Re: Spitfire3292] #174049 01/04/07 10:51 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Quite likely, since hash tables are stored in RAM until they are freed, either by mIRC closing or the /hfree command being used.

You should check the amount of RAM you're starting with, and see how much other programs are using. If the total RAM being used is more than about 50% of your total RAM, then your system is (or should be) using a swap file, which means disk access, which, as I've said before, is extremely slow.

Re: mIRC taking up far too much cpu power [Re: RusselB] #174054 02/04/07 12:33 AM
Joined: Mar 2007
Posts: 60
S
Spitfire3292 Offline
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
Ahh! Yes! Hash Tables are stored in RAM. I hadn't thought of that! Maybe I should clear them or seperate them, or use an INI file. Woot! Thanks! I think you found my problem!


"In order to succeed, your desire for success should be greater than your fear of failure."
Re: mIRC taking up far too much cpu power [Re: Spitfire3292] #174060 02/04/07 01:06 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That's the issue I mentioned with Invision. It has a lot of tables, so it uses extra CPU (not much, but noticeable if you look at the task manager). I'm curious about the 5MB table. What's it for? Hash tables are good for data that is used frequently (usually, that means that the table is fairly small). If you have data stored that isn't used often, then saving it to a file is probably better.

You could easily find out if that's the problem by freeing the table and checking your CPU usage.


Invision Support
#Invision on irc.irchighway.net
Re: mIRC taking up far too much cpu power [Re: Riamus2] #174063 02/04/07 01:12 AM
Joined: Mar 2007
Posts: 60
S
Spitfire3292 Offline
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
The hash table was used in my seen script that I had created for my bot. Imagine, a hash table last cleared when the bot/script was created (December 10th, 2006) and on average the bots are on 65 channels with 35 users on average, peaking at over 100 channels. After a few months the amount of unique users my bot is going to see are extremely high, which is why the hash table was 5.56 megs. I just free'ed and deleted the hash table so we can start clean. Now its at 4 kb laugh Hopefully this will solve the problem. *Keeps his fingers crossed*

Again, thanks for all the help.


"In order to succeed, your desire for success should be greater than your fear of failure."
Re: mIRC taking up far too much cpu power [Re: Spitfire3292] #174065 02/04/07 01:21 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You may want to have the table automatically clear anyone who hasn't been seen in over 2 or 3 months or something.


Invision Support
#Invision on irc.irchighway.net
Re: mIRC taking up far too much cpu power [Re: Riamus2] #174066 02/04/07 01:29 AM
Joined: Mar 2007
Posts: 60
S
Spitfire3292 Offline
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
I could do that. I do store the $ctime in the hash. If I periodically check to see if $ctime - CTIME is over 2419200 seconds (4 weeks), remove that item. Again, another good idea that I could easily implement.

Again, Thanks.

EDIT: This might be a problem if you have 10,000 unique items in the hash. A while loop might not be the best way to attempt this. Any ideas?

Last edited by Spitfire3292; 02/04/07 01:34 AM.

"In order to succeed, your desire for success should be greater than your fear of failure."
Re: mIRC taking up far too much cpu power [Re: Spitfire3292] #174068 02/04/07 01:50 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If you have a commonality in the item names for these items, then you might be able to use /hdel -w <wildcarded item name>

See /help /hdel for more details.

Re: mIRC taking up far too much cpu power [Re: RusselB] #174071 02/04/07 02:00 AM
Joined: Mar 2007
Posts: 60
S
Spitfire3292 Offline
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
Each item is a different address mask. Then for each value of the item I use $gettok. I guess in this case /hdel wouldn't help me.


"In order to succeed, your desire for success should be greater than your fear of failure."
Page 1 of 2 1 2