[ndnSIM] Inquiry about ConsumerZipfMandelbrot

Jack Baldasso jackbaldasso at gmail.com
Thu Dec 13 19:10:32 PST 2018


A follow-up email with more tests:

Using a fresh ndnSIM 2.6 installation and the ndn-zipf-mandelbrot.cpp file
in the examples, I modified that code to reflect the desired behavior
(Consumer App requesting contents starting from a specific Seq Number) and
enabled logging.

    // Install CCNx applications
    std::string prefix = "/prefix";

    ndn::AppHelper consumerHelper("ns3::ndn::ConsumerZipfMandelbrot");
    // ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
    consumerHelper.SetPrefix(prefix);
    consumerHelper.SetAttribute("Frequency", StringValue("10"));        //
100 interests a second
    consumerHelper.SetAttribute("NumberOfContents", StringValue("1000"));
// 10 different contents
    /************************/
    consumerHelper.SetAttribute("StartSeq", StringValue("100"));  // <----
This line was added ---
    /************************/
    // consumerHelper.SetAttribute ("Randomize", StringValue ("uniform"));
// 100 interests a second
    consumerHelper.Install(consumerNodes);

The behavior presented in the logs show the Consumer requesting contents
with Seq number under 100.

    +76.400000000s 0 ndn.ConsumerZipfMandelbrot:GetNextSeq(): [DEBUG]
RandomNumber=17
    +76.400000000s 0 ndn.ConsumerZipfMandelbrot:SendPacket(): [INFO ] >
Interest for 17, Total: 865, face: 259
    ...
    +76.800000000s 0 ndn.ConsumerZipfMandelbrot:GetNextSeq(): [DEBUG]
RandomNumber=61
    +76.800000000s 0 ndn.ConsumerZipfMandelbrot:SendPacket(): [INFO ] >
Interest for 61, Total: 869, face: 259


How can I accomplish the desired behavior so the consumer app starts
requesting content at a certain Seq Number?
According to the documentation
<http://ndnsim.net/current/doxygen/classns3_1_1ndn_1_1ConsumerZipfMandelbrot.html>
this
consumer application inherits the "StartSeq" from the parent class.




On Thu, Dec 13, 2018 at 10:59 AM Jack Baldasso <jackbaldasso at gmail.com>
wrote:

> Hi,
>
> I'm testing an application using the ConsumerZipfMandelbrot where I
> specify that each node requests a certain chunk of information. I'm using
> ndnSIM 2.6 on an Ubuntu 16.04 Vagrant VM with 4 GB of memory and 1 CPU
> (Intel Core i7-7700 3.60GHz)
>
> I'm defining the consumer application as follows:
>
>     std::string prefix = "/ndn/acme/";
>
>     ndn::AppHelper consumerHelper("ns3::ndn::ConsumerZipfMandelbrot");
>     consumerHelper.SetAttribute("Frequency", StringValue (10));
>     //consumerHelper.SetAttribute("NumberOfContents", StringValue (1000));
>     consumerHelper.SetPrefix(prefix);
>
>     Ptr<UniformRandomVariable> rnd = CreateObject<UniformRandomVariable>
> ();
>
>     uint32_t nNodes = nodes.GetN ();
>     for (uint16_t i = 0; i < nNodes; i++){
>         uint16_t start_seq = rnd->GetInteger (0,10000) ;  // random
> between 0 and 10,000
>         consumerHelper.SetAttribute("StartSeq",StringValue
> (std::to_string( start_seq)));
>         consumerHelper.SetAttribute("MaxSeq",StringValue (std::to_string(
> start_seq + 1000)));
>     }
>     consumerHelper.Install(nodes);   // where `nodes` is a node container
> with 50 nodes
>
>     Simulator::Stop(Seconds(1000.0));
>
> Despite the fact that I'm setting the Simulator::Stop to 1000 seconds, my
> simulation is stopping just over 100 seconds. I assume this is because all
> nodes finish requesting all 1,000 contents assigned to them (10 Int/s * 100
> seconds). But my understanding of the ConsumerZipfMandelbrot application is
> that it will keep requesting contents until the simulation ends at 1000
> seconds.
>
> Is my assumption wrong? If so, what are other possible things to check?
> There's no error message given, the simulation ends normally.
>
> Thanks,
> Jack
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20181213/f815eb0c/attachment.html>


More information about the ndnSIM mailing list