<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Saran,<div><br></div><div>Thank you very much for your contribution!  I have just committed your Linux implementation of memory utilization with minor changes, replaced file reading procedures to STL equivalents.  I checked and it seem to work on both Mac and Linux.</div><div><br></div><div>As for the second issue, another thanks to you for catching the problem!  Apparently, there were two serious bugs with ZipfMandelbrot and Lfu policy implementation.  The first problem, which you may or may not encountered on Linux, was causing enormous memory utilization and I basically couldn't even run your scenario.</div><div><br></div><div>The second problem was related to Lfu implementation, which I did slightly incorrectly.  This error basically broke the consistency of the internal "frequency" representation, making the whole thing behave very strange. </div><div><br></div><div>Thanks again!</div><div><br></div><div>With the updated ndnSIM code, your scenario gives a consistent results with Lfu policy.  Can you check it?</div><div><br></div><div>---</div><div>Alex</div><div><br></div><div><br><div><div>On Mar 28, 2013, at 3:19 AM, Saran Tarnoi <<a href="mailto:sarantarnoi@gmail.com">sarantarnoi@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Alex and all,<div><br></div><div>I spent some time to fix the problem about memory usage tracking for ndnSIM in Linux (mem-usage.h).</div><div>Would you kindly check that for me since I don't have the reference value?</div>
<div>If it is correct, please consider uploading it to the public.</div><div><br></div><div>Another issue, I found a wired thing. </div><div>When the Zipfmandelbrot is used for generating interest traffic and Lfu is set as the replacement policy for the Content Store, </div>
<div>if  "NumberOfContents" of Zipfmandelbrot > "MaxSize" of Content Store, the cache replacement under Lfu performs strangely.</div><div>The number of CS entries is sometimes above or lower the given "MaxSize".</div>
<div>It is never equal to the given "MaxSize" of the Content Store.</div><div>I also attach the example that shows the problem. You may check it.</div><div>I did not see this kind of problem when the Zipfmandelbrot is used with either Random, Lru, or Fifo.</div>
<div>Have you ever met the problem?</div><div><br></div><div>Thanks for your time.</div><div><br></div><div>Regards,</div><div>Saran Tarnoi</div><div><br><br><div class="gmail_quote">2013/3/19 Alex Afanasyev <span dir="ltr"><<a href="mailto:alexander.afanasyev@ucla.edu" target="_blank">alexander.afanasyev@ucla.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Saran,</div><div><br></div><div>PIT also could have contributed to a large (and growing) memory utilization.  Are Interests in your scenario getting satisfied?  You can try to set limits on PIT size, for example, ndn::StackHelper::SetPit("ns3::ndn::pit::Persistent", "MaxSize", "5000"), and see what could happen with memory.</div>
<div><br></div><div>I have fully tested memory utilization tool only on Mac computer, so it may need certain adjustments to be run on other platforms (in master branch, non-OSX code is commented out because of compatibility issues which have not been resolved yet).</div>
<div><br></div><div>Thanks for your suggestion.  Caching (relative long-term) / buffering (short-term, to recover from "last-hop" losses and prevent re-expressed Interests to go back to the producer) are essential components of NDN architecture and the more options we have in ndnSIM, the more clearly we can see what works (under which assumptions/environments) and what's not.  Would you be willing to implement such a random caching policy?  There is already an implementation of random caching replacement policy (ns3::ndn::cs::Random using utils/trie/random-policy.h), but this implementation is rather simplistic and doesn't allow one to configure probabilities.</div>
<div><br></div><div>---</div><div>Alex</div><br><div><div><div class="h5"><div>On Mar 19, 2013, at 3:52 AM, Saran Tarnoi <<a href="mailto:sarantarnoi@gmail.com" target="_blank">sarantarnoi@gmail.com</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5">Hi Alex and everyone,<div><br></div><div>Sorry for the late reply.</div><div><br></div><div><div>In my simulation, there are 100 nodes.</div><div>The capacity of the CS of each node is 5,000.</div>
<div>There are 1,000,000 different content objects.</div>
</div><div><br></div><div>According to your guide, the required memory should be 702 bytes*5000*100 = 351 MB.</div><div>I don't know why it takes more than 8 GB.</div><div>In addition, the required memory increases as a function of the simulation time.</div>

<div><br></div><div>I have tried your suggested example.</div><div>I had no luck, the column of MemUsage consistently shows "-9.53674e-07."</div><div>I will try to see what I can do.</div><div><br></div><div>Oh, I have a suggestion for additional function in ndnSIM.</div>

<div>In the current version of ndnSIM, I understand that every content is cached in every node it traverses.</div><div>It may be good if we can randomly cache a content object at a certain probability for each node.</div>

<div>Please feel free to let me know what you think.</div><div><br></div><div>Thanks for your help.</div><div><br></div><div>Regards,</div><div>Saran Tarnoi</div><div><br></div><div><br></div><div><br><div class="gmail_quote">

2013/2/20 Alex Afanasyev <span dir="ltr"><<a href="mailto:alexander.afanasyev@ucla.edu" target="_blank">alexander.afanasyev@ucla.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div>Hi Saran,</div><div><br></div><div>How many nodes are in your simulation?  I just checked memory overhead for different replacement policies and they are about the same (with Lfu taking a little bit more).    As for numbers, one CS entry in the current implementation corresponds to about 708 bytes memory footprint with Lfu policy (with freshness) and about 650 bytes with Lru policy.  (I haven't yet had time to investigate why so much, as I was expecting about 10 times smaller footprint.)   </div>

<div><br></div><div>You can get commit 41684ab625b165, which gives an example of how to evaluate memory footprint (ndn-simple-with-cs-lfu.cc)</div><div><br></div><div>---</div><div>Alex</div><div><br><div>
<div>On Feb 19, 2013, at 5:02 AM, Saran Tarnoi <<a href="mailto:sarantarnoi@gmail.com" target="_blank">sarantarnoi@gmail.com</a>> wrote:</div><br><blockquote type="cite">To Alex and everyone,<div><br></div><div>I conducted a simulation to see how <b>Lfu</b> performs.</div>

<div>Content number is set as "100,000."</div><div>It appeared that the simulator consumed memory more than that my laptop can provide (RAM 4GB), then my laptop stopped working. </div>
<div>The problem did not appear when I used the other replacement policies (Lru, Random) for Content Store.</div><div><div>Would you kindly give me some ideas?</div><div><br></div><div>Thanks,</div><div>Saran</div></div>

</blockquote></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<div>Saran Tarnoi</div><div>Graduate Student</div><div>Department of Informatics</div><div>The Graduate University for Advanced Studies (Sokendai)</div>

<div>Tokyo, Japan</div><div><a href="http://sarantarnoi.blogspot.jp/2012/11/my-profile.html" target="_blank">http://sarantarnoi.blogspot.jp</a><br></div>
</div></div></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<div>Saran Tarnoi</div><div>Graduate Student</div><div>Department of Informatics</div><div>The Graduate University for Advanced Studies (Sokendai)</div>
<div>Tokyo, Japan</div><div><a href="http://sarantarnoi.blogspot.jp/2012/11/my-profile.html" target="_blank">http://sarantarnoi.blogspot.jp</a><br></div>
</div>
<span><mem-usage.h></span><span><ndn-simple-with-cs-lfu.cc></span>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br></blockquote></div><br></div></body></html>