mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2008
Posts: 7
T
T4K Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2008
Posts: 7


I'm running a few scripts on it. Since 7.25 came out... I upgraded and the ram spike is huge. Why is that? I've woken up sometimes in the morning and it's around 1.7Gigs usage. I mean the computer I'm running it on has 24 gigs of ram. But regardless that's a lot. If you need any information I'll be glad to provide anything you guys ask.

Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Please type the following in mIRC and copy the results here:

//echo -a $os $version $md5($mircexe,2) $file($mircexe).sig $script(0) $dll(0) $com(0)

Joined: May 2008
Posts: 7
T
T4K Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2008
Posts: 7
2008R2 7.25 cfd7965dd048060f4dfbd49cf5a8a16b ok 23 0 0

Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
You have quite a few scripts loaded. We can't really tell if it's the script(s) that have the memory leak or mIRC itself. Try turning scripts off (by typing /remote off), restart mIRC, then see if the memory usage still grows. You can type /remote on to enable them again later.

Joined: May 2008
Posts: 7
T
T4K Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2008
Posts: 7
That irc client serves as a bot. I can unload the ones that I don't use which I have and it still has a memory leak of some sort. I got it all the way down to about 8 scripts.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Well, unload all the scripts and confirm that mIRC is not spiking to that much RAM usage without your bot. Then you can be sure that it's the bot that is faulty, and inform the author to look at it.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Feb 2003
Posts: 307
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
I will also upgrade by bot to see it i notice something spiking

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
Just chiming in with my experience. I have two 7.25 mircs running one with 27 and the other 42 scripts. The first being my personal and the second a channel bot. Both have been running for 3wks 13hrs 12mins and are using 34MB and 64MB respectively.

So I'd have to agree with someone else it's probably a script causing the leak.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Feb 2011
Posts: 424
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 424
Lets try to narrow down this issue.

Check for hash tables.
//var %x $hget(0) | while %x { echo -ag $hget(%x) $hget(%x,0).item - $hget(%x).size | dec %x }

Uptime.
//echo -ag mIRC: $uptime(mirc,2) - Computer: $uptime(system,2)


Tools -> Options -> Other -> Windows buffer: ???? lines.
What is the number?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Uptime shouldn't be the cause, but just shows how long whatever is causing the problem has had to increase memory usage. Under normal circumstances, memory usage shouldn't change no matter how long mIRC's running. I've left mIRC running for just short of 8 weeks without the memory usage ever hitting 100MB, let alone over a GB. And that's while running Invision, which is a pretty big script.

The most likely causes are hash tables, sockets, and perhaps window buffers. DLLs and COM can also cause this, but the pasted results show that there are 0 of both of those items in use.

In the end, the most likely cause is a script that is not properly closing *something* and is opening many of that *something* until a lot of memory is being used.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2003
Posts: 38
Ameglian cow
Offline
Ameglian cow
Joined: Sep 2003
Posts: 38
I would strongly suggest using VMMap.exe from SysInternals/Microsoft, pick your existing/running mirc32.exe process (when its bloated), and provide a screenshot of the results. Please be sure to resize the window horizontally so that all the columns in the top section of the program (e.g. Type, Size, Committed, etc.) are visible.

The answer as to what's allocated all the memory may or may not be easily determined from use of this program, however. Heap and stack allocations are "vague", meaning there is no easy way to say "this specific script/yadda yadda is causing this allocation problem". However, if your scripts rely on DLLs, there is a good chance that DLL will show up in the list of allocations near the bottom under "Details" (have fun scrolling through all the data).

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Originally Posted By: Riamus2
Uptime shouldn't be the cause,


I don't think anyone was suggesting that uptime was the cause, but if the script is leaking data as was suggested, uptime is definitely going to be a factor. It's therefore useful to show uptime for reference. If the footprint is 800mb only 30 minutes into running the program, the behaviour might be a feature of the script rather than a bug (i.e. it loads some large database into memory instead of reading off disk). If it takes a week to get to that point, the script is likely storing more data into memory over time at a fast rate, and it's possible that the author didn't take into account long running processes or clearing out old memory.

Memory usage shouldn't change no matter how long mIRC is running, but a script can easily make memory usage increase over time. Consider a script that logs every line of text to a hash table-- eventually you will grow a large memory footprint, though it would likely be on the order of years, not months. Now imagine a poorly written script that stores that same line 5 times in different tables, or has some kind of exponential data growth. Now we're talking weeks/months instead of years.

By the way, just as a note, we shouldn't rule out a leak in mIRC. It's completely possible that some obscure order of commands could cause mIRC to allocate memory and lose it rather than free it when the script ends; this bug could have been exposed by the script.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Feb 2003
Posts: 307
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
No memory leaks here in more then 2 days running (using 42MB).


Link Copied to Clipboard