<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/17569" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2010-02-07T15:02:14-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/17569</id>

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-02-07T15:02:14-04:00</updated>

		<published>2010-02-07T15:02:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92009#p92009</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92009#p92009"/>
		<title type="html"><![CDATA[Trying to understand eggdrop memory usage numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92009#p92009"><![CDATA[
Well, to dig into the various numbers returned by "top":<br>%MEM: currently used physical ram (same as RES). Also known as non-swapped memory.<br>RES: Same as above, but in real numbers rather than a percentage of available physical memory.<br>CODE: Amount of physical memory used for executable code aka 'text resident set' - TRS.<br>DATA: Amount of physical memory used for non-executable code aka 'data resident set' - DRS.<br>SHR: Memory flagged as shared with other processes.<br>SWAP: Amount of memory currently residing on the swap storage (aka non-physical memory).<br>VIRT: Total memory footprint, including both physical, swap, and shared memory.<br><br><br>Lots of fancy names, but what does this all mean?<br>Simply put, most OS'es these days try to be smart 'bout memory usage. All processes don't need all their memory at the very same time, so by using a swap device, we can store some of the currently not-in-use data there, freeing that area of the physical memory for other data. This, unfortunately, leads to performance impact whenever a process tries to read a "memory page" (the mechanics used to move sections of data in and out of ram is called page swapping, the virtual memory is divided into several memory pages which gets moved into an available ram slot whenever it's needed) that's not currently in the physical ram - since it first has to be retrieved from the swap device. Thus, linux tries to keep as much data as possible in ram at all times - keeping rather high numbers of used ram and low numbers of used swap.<br><br>So, is 256Mb the limit? If you've got a swap device, no. Though using a 4Tb swap would perhaps not be favorable... The larger the swap-to-physical ratio, the more often your system will have to swap pages, slowing down execution. One way to see how much memory you've currently got at your disposal, would be to execute this (shown with sample output):<div class="codebox"><p>Code: </p><pre><code>[root@linux /]# free -t             total       used       free     shared    buffers     cachedMem:        904624     887492      17132          0     201256     186504-/+ buffers/cache:     499732     404892Swap:      2031608        124    2031484Total:     2936232     887616    2048616[root@linux /]#</code></pre></div>This is a system with 1Gb of ram, and an additional 2Gb of swap. As you can see, only 124kb of the swap device is used, while there's only 17Mb of ram free - virtually the swap is unused. However, I could easily use another 1Gb of memory without notable performance impact.<br><br>Now, the linux kernel has another trick up it's sleeve. In addition to swap memory pages, it can also shrink it's buffers and caches to free ram when another process needs it. Which way is determined by some half-advanced logic for the kernel to try and guess which will be more favorable.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Feb 07, 2010 3:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2010-02-07T13:16:10-04:00</updated>

		<published>2010-02-07T13:16:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92008#p92008</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92008#p92008"/>
		<title type="html"><![CDATA[Trying to understand eggdrop memory usage numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92008#p92008"><![CDATA[
<blockquote class="uncited"><div>I'll se if I can't write a more extensive reply once I get back on my workstation..<br><br>...</div></blockquote>Great!       ... looking forward to it.<br><br>And thanks for taking time to explain.   We are trying to decide what to do and not do...  I suppose you could say we are trying to determine our limits....   and I hope we are asking the right questions.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sun Feb 07, 2010 1:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-02-06T10:47:04-04:00</updated>

		<published>2010-02-06T10:47:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91982#p91982</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91982#p91982"/>
		<title type="html"><![CDATA[Trying to understand eggdrop memory usage numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91982#p91982"><![CDATA[
I'll se if I can't write a more extensive reply once I get back on my workstation..<br><br>Roughly though, there are several different kinds of 'used memory', or rather, allocated memory.<br><br>First, the 217k number: This is the amount of data memory that has been allocated using nmalloc() (a memory-tracking version of malloc()), that yet has not been nfree()'d. Thus, this only covers dynamically allocated memory.<br><br>Next, the 8%: this would be the complete footprint of the process(es), including the dynamically allocated memory. This would also include the machinecode pages (the actual instructions that makes the bot tick), including any external library that has been loaded into the process. As such, this number is usually much larger than the size of a dynamically linked binary.<br><br>It would be normal to see some fluctuations of the memory footprint as your eggdrop runs. If, however, you see the amount of used memory constantly increasing over a long period of time, and don't use any 'statistics' script or module, gseen/bseen, AI's, etc that allocates large amount of data based on channel traffic or chatter - that would make for a good concern regarding memory leaks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Feb 06, 2010 10:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2010-02-05T21:11:45-04:00</updated>

		<published>2010-02-05T21:11:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91968#p91968</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91968#p91968"/>
		<title type="html"><![CDATA[Trying to understand eggdrop memory usage numbers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91968#p91968"><![CDATA[
Hello,<br><br>Using  eggdrop v1.6.19+ctcpfix   on a linux shell.<br><br><br>A friend has a new virtual private server, and I have a shell via him.<br>Running an eggdrop bot there now.   No problems.<br><br>Recently, we were considering various things, and one of them was adding another bot, or bots.<br><br>He had concerns, as he has 256M of ram.<br>So, we are trying to figure out what we can do, and can't do.<br><br>I used the .status command, and got      (mem: 217k)     .<br>Is that to be taken literally?   that the bot is using only 217 kilobytes of memory?<br>My friend took it to mean 217k of kilobytes.<br>We're looking to understand just what it means.<br>Please explain.<br><br>Also,  today, it is up to   (mem: 226k) .    And my friend believes that mem usage creeps up, the longer the bot is online.   This jives with that idea.<br>Are there memory issues with eggdrops?   leaks, maybe?<br><br><br>Third question:<br>I went to the command line, via ssh, and ran  top.<br>There is a multitude of info there, and we need some help with understanding that too.<br>In particular:<br>We see, up in the header part,     <br>Mem:    262144k total, <br>and that jives with his  256M of ram.  <br>In the display below,  for the eggdrop,  I see in a column named: %MEM<br>,   8.0 for the eggdrop.<br>That would be around 20.48M . <br>Is this what the eggdrop is using?<br><br>Fourth, and last question:<br>There is another column, labeled  RES<br>and in that column, for the eggdrop, I see  20M<br>What is the RES column telling me?<br><br><br>I've looked in   man top        , and the info there was not enough for me to get it,  so I'm asking here for some help in understanding what I'm looking at...<br>and<br>for help in learning how to decide what the limits are... number of eggdrops, that the vps can handle,  etc.        I hope we are on the right track, so far.<br><br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Feb 05, 2010 9:11 pm</p><hr />
]]></content>
	</entry>
	</feed>
