Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Store not working (ndnSIM 2.8) #101

Open
fam4r opened this issue Oct 22, 2020 · 14 comments
Open

Content Store not working (ndnSIM 2.8) #101

fam4r opened this issue Oct 22, 2020 · 14 comments

Comments

@fam4r
Copy link

fam4r commented Oct 22, 2020

Hi,

it seems that Content Store is not caching Data Packets in ndnSIM 2.8.

I ran two simulation based on the same scenario (ndn-tree-cs-tracers.cpp) in ndnSIM 2.7 (from ndnsim.net) and ndnSIM 2.8 (from ndnsim.net). As stated on the website, ndnSIM 2.7 uses the old content store structure, which it works (see later for logs and tracer file).

The topology used is topo-tree.txt (source).
Scenarios were placed in two different folder templates based on the provided scenario template.

I used in both versions the debug mode to be able to inspect logs along together the ndn::CsTracer output file.

ndnSIM 2.7 results:

  • logs:
    ns-3$ ./waf shell
    $ cd ~/simulation
    simulation$ ./waf configure --debug
    simulation$ ./waf build
    simulation$ NS_LOG=ndn.Consumer:ndn.Proucer PKG_LIBRARY_PATH=/usr/local/lib ./build/ndn-tree-cs-tracers-27_old
    [...]
    +19.920000000s 2 ndn.Consumer:SendPacket()
    +19.920000000s 2 ndn.Consumer:SendPacket(): [INFO ] > Interest for 199
    +19.920000000s 2 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 199 with +19920000000.0ns. already 0 items
    +19.925790398s 2 ndn.Consumer:OnData(0x1c813d0, 0x1f0c270)
    +19.925790398s 2 ndn.Consumer:OnData(): [INFO ] < DATA for 199
    +19.925790398s 2 ndn.Consumer:OnData(): [DEBUG] Hop count: 2
    +19.929999999s 3 ndn.Consumer:SendPacket()
    +19.929999999s 3 ndn.Consumer:SendPacket(): [INFO ] > Interest for 199
    +19.929999999s 3 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 199 with +19929999999.0ns. already 0 items
    +19.932895198s 3 ndn.Consumer:OnData(0x1bc1590, 0x1f0c270)
    +19.932895198s 3 ndn.Consumer:OnData(): [INFO ] < DATA for 199
    +19.932895198s 3 ndn.Consumer:OnData(): [DEBUG] Hop count: 1
    
  • CS Tracer file
    Time	Node	Type	Packets	
    [...]
    19	leaf-1	CacheHits	0
    19	leaf-1	CacheMisses	10
    19	leaf-2	CacheHits	0
    19	leaf-2	CacheMisses	10
    19	leaf-3	CacheHits	0
    19	leaf-3	CacheMisses	10
    19	leaf-4	CacheHits	0
    19	leaf-4	CacheMisses	10
    19	rtr-1	CacheHits	10
    19	rtr-1	CacheMisses	10
    19	rtr-2	CacheHits	10
    19	rtr-2	CacheMisses	10
    19	root	CacheHits	10
    19	root	CacheMisses	10
    

ndnSIM 2.8 results:

  • logs:
    ns-3$ ./waf shell
    $ cd ~/simulation
    simulation$ ./waf configure --debug
    simulation$ ./waf build
    simulation$ NS_LOG=ndn.Consumer:ndn.Proucer PKG_LIBRARY_PATH=/usr/local/lib ./build/ndn-tree-cs-tracers-28
    [...]
    +19.920000000s 2 ndn.Consumer:SendPacket()
    +19.920000000s 2 ndn.Consumer:SendPacket(): [INFO ] > Interest for 199
    +19.920000000s 2 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 199 with +19920000000.0ns. already 0 items
    +19.925759998s 2 ndn.Consumer:OnData(0x55c4e0570830, 0x55c4e0826460)
    +19.925759998s 2 ndn.Consumer:OnData(): [INFO ] < DATA for 199
    +19.925759998s 2 ndn.Consumer:OnData(): [DEBUG] Hop count: 2
    +19.929999999s 3 ndn.Consumer:SendPacket()
    +19.929999999s 3 ndn.Consumer:SendPacket(): [INFO ] > Interest for 199
    +19.929999999s 3 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 199 with +19929999999.0ns. already 0 items
    +19.932879998s 3 ndn.Consumer:OnData(0x55c4e053e650, 0x55c4e0596020)
    +19.932879998s 3 ndn.Consumer:OnData(): [INFO ] < DATA for 199
    +19.932879998s 3 ndn.Consumer:OnData(): [DEBUG] Hop count: 2
    
    • Note: Hop count for host 3 (but this happens for all the consumers for the whole simulation) is now 2 and not 1 as for ndnSIM 2.7 logs
  • CS Tracer file
    Time	Node	Type	Packets	
    [...]
    19	leaf-1	CacheHits	0
    19	leaf-1	CacheMisses	0
    19	leaf-2	CacheHits	0
    19	leaf-2	CacheMisses	0
    19	leaf-3	CacheHits	0
    19	leaf-3	CacheMisses	0
    19	leaf-4	CacheHits	0
    19	leaf-4	CacheMisses	0
    19	rtr-1	CacheHits	0
    19	rtr-1	CacheMisses	0
    19	rtr-2	CacheHits	0
    19	rtr-2	CacheMisses	0
    19	root	CacheHits	0
    19	root	CacheMisses	0
    
    • Note: the column Packets is set at 0 for the entire file.

I assume that Content Store is not properly working in ndnSIM 2.8. I don't know how to deeply investigate for the problem.

Installation info:

Thanks

@hyperonex
Copy link

I do confirm the same problem with version 2.8!

@BITXUJI
Copy link

BITXUJI commented Dec 12, 2020

Anyone has solved this problem?

@jrszoio
Copy link

jrszoio commented Apr 3, 2021

I do confirm this same problem on ndnSIM 2.8.

@RebornSEC
Copy link

I do confirm this same problem on ndnSIM 2.8, is there any body who found a solution to this problem ? Thank you all in advance

@wuodland
Copy link

I do confirm this same problem on ndnSIM 2.8, is there any body who found a solution to this problem ? Thank you all in advance

sadly not. I switched back to the branch ndnSIM-v2.5 to get it working again.

@salubinseid
Copy link

Anyone has solved this problem? or how to switch back to ndnSIM-v2.7 or older? Thanks

@fam4r
Copy link
Author

fam4r commented Nov 3, 2021

or how to switch back to ndnSIM-v2.7 or older? Thanks

@salubinseid you can try to use my unofficial Docker image of ndnSIM without caring of the installation process for any recent version.

https://github.com/fam4r/docker-ndnsim

@hyperonex
Copy link

hyperonex commented Nov 3, 2021 via email

@wuodland
Copy link

wuodland commented Nov 4, 2021

Hi,As far as I remember I solved the problem by removing a comment left in one line in the cs tracer source code!

Can you tell us which line is it? The CS tracer file hasn't been updated since 2015(and older versions where it works fine use the same one)

Anyone has solved this problem? or how to switch back to ndnSIM-v2.7 or older? Thanks

While cloning the repo add the 2.5 branch for example this way:
git clone -b ndnSIM-v2.5 https://github.com/named-data-ndnSIM/ns-3-dev.git ns-3
and
git clone -b 0.18.0 https://github.com/named-data-ndnSIM/pybindgen.git pybindgen
git clone -b ndnSIM-2.5 --recursive https://github.com/named-data-ndnSIM/ndnSIM ns-3/src/ndnSIM

Run waf configure and waf in the ns-3 folder after that

@migrax
Copy link

migrax commented Dec 14, 2021

Can you try if PR #111 fixes your problem?

@Celcnu
Copy link

Celcnu commented Jan 4, 2022

This solved my problem on v2.8, thanks a lot !

Can you try if PR #111 fixes your problem?

@Celcnu
Copy link

Celcnu commented Jan 4, 2022

Can you try if PR #111 fixes your problem?

Oh! There some mistakes, the "CacheMisses" value is wrong.
Because "management interests" are processed in the same way as regular interests. So the "CacheMisses" value is higher than its exact value.
Methods are needed to distinguish "management interests" and "regular interests (to fetch named data)".

Ref: NFD Developer’s Guide (Latest Revision 11), section 1.3

@mmaizan
Copy link

mmaizan commented May 29, 2023

Can you try if PR #111 fixes your problem?

I am sorry still got error with this solution when compiling message like below:

In file included from ../src/ndnSIM/utils/tracers/ndn-cs-tracer.cpp:20:
../src/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
../src/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);
| ^
../src/ndnSIM/utils/tracers/ndn-cs-tracer.cpp:225:1: error: expected initializer before ‘CsTracer’
225 | CsTracer::CacheHits(const Interest&, const Data&)
| ^~~~~~~~
../src/ndnSIM/utils/tracers/ndn-cs-tracer.cpp:232:1: error: expected initializer before ‘CsTracer’
232 | CsTracer::CacheMisses(const Interest&)
| ^~~~~~~~

In file included from ./ns3/ndn-all.hpp:35,
from ./ns3/ndnSIM-module.h:10,
from ../src/ndnSIM/examples/ndn-custom-apps.cpp:24:
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);
| ^

In file included from ./ns3/ndn-all.hpp:35,
from ./ns3/ndnSIM-module.h:10,
from ../src/ndnSIM/examples/ndn-csma.cpp:25:
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);
| ^

In file included from ./ns3/ndn-all.hpp:35,
from ./ns3/ndnSIM-module.h:10,
from ../src/ndnSIM/examples/ndn-congestion-alt-topo-plugin.cpp:24:
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);
| ^

In file included from ./ns3/ndn-all.hpp:35,
from ./ns3/ndnSIM-module.h:10,
from ../src/ndnSIM/examples/ndn-congestion-topo-plugin.cpp:24:
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);
| ^

In file included from ./ns3/ndn-all.hpp:35,
from ./ns3/ndnSIM-module.h:10,
from ../src/ndnSIM/examples/ndn-cxx-simple.cpp:25:
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);
| ^

In file included from ./ns3/ndn-all.hpp:35,
from ./ns3/ndnSIM-module.h:10,
from ../src/ndnSIM/examples/ndn-different-strategy-per-prefix.cpp:26:
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);
| ^

In file included from ./ns3/ndn-all.hpp:35,
from ./ns3/ndnSIM-module.h:10,
from ../src/ndnSIM/examples/ndn-grid-multiple-strategies.cpp:26:
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:157:41: error: ISO C++ forbids declaration of ‘CacheHits’ with no type [-fpermissive]
157 | CacheHits(const Interest&, const Data&);
| ^
./ns3/ndnSIM/utils/tracers/ndn-cs-tracer.hpp:161:30: error: ISO C++ forbids declaration of ‘CacheMisses’ with no type [-fpermissive]
161 | CacheMisses(const Interest&);

@bvn-jk
Copy link

bvn-jk commented Nov 26, 2023

Can you try if PR #111 fixes your problem?

Oh! There some mistakes, the "CacheMisses" value is wrong. Because "management interests" are processed in the same way as regular interests. So the "CacheMisses" value is higher than its exact value. Methods are needed to distinguish "management interests" and "regular interests (to fetch named data)".

Ref: NFD Developer’s Guide (Latest Revision 11), section 1.3

Do anyone know how to fix this or is it not solvable easily?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests