icarus-sim / icarus Goto Github PK
View Code? Open in Web Editor NEWA scalable simulator for evaluating the performance of in-network caches in Information Centric Networking (ICN)
Home Page: http://icarus-sim.github.io
License: Other
A scalable simulator for evaluating the performance of in-network caches in Information Centric Networking (ICN)
Home Page: http://icarus-sim.github.io
License: Other
Dear Sir,
Thank you for providing us with such a powerful tool for developing caching strategies in the ICN environment. Sir, as I am new to the Icarus tool, I have some queries, which I have listed below. I understand that you are very busy, but I would like to request that you please resolve my concerns, for which I am grateful.
Thanks and Regards
Pankaj
Dr.Lorenzo
Thank you for providing me with great tools related to ICN.
I'm studying for caching algorithm in ICN especially content-based replication
In your paper, you mentioned that your ICN research are all cache-or node- based.
Is there any way to change it into content-based replication?
I'm sorry if it's an immature question because I'm not familiar with
thank you!
In this file
https://github.com/icarus-sim/icarus/blob/master/icarus/scenarios/topology.py
line 350
fnss.add_stack(topology, v, 'rotuer')
should be
fnss.add_stack(topology, v, 'router')
The spelling probelm will cause GARR topology raised exception in hash route strategy. --)
Hello @lorenzosaino
I was trying to run CL4M with rocket_fuel_latency topology and I got an error in orchestration file, this line:
" topology = TOPOLOGY_FACTORYtopology_name "
hope you can help me to resolve this.
After installing the latest version of networkx, error shows:
fnss 0.9.0 requires networkx<=2.4,>=2.0, but you'll have networkx 2.5 which is incompatible.
icarus 0.7.0 requires networkx<2.0,>=1.6, but you'll have networkx 2.5 which is incompatible.
If I install networkx==1.11 from make then it shows :
fnss 0.9.0 requires networkx<=2.4,>=2.0, but you'll have networkx 1.11 which is incompatible.
Need help badly :(
Hello,
i'm trying to write a new strategy for caching and i need link load for my computation, i'm a little confused, can you help me how to use it in on path class? i don't know if i can use the collectors class or not? :(
i really appreciate it if you could give me a hint
thanks
Hi,
May I check whether you have a limitation on assign statements for version 0.9.7 and 0.9.8 of icarus?
Seems like assigns work only when constant values are assigned.
Thanks
Hello,
As i was trying to run on path vs off path experiments, there was an error about not being able to draw the plots. I think there is a problem in makefile and
plot: check_icarus_installed
should change to
plot: check_installed
is it right?
Hi,
I'm getting errors with always_ff, always_comb in icarus.
Can I please check if these are not yet supported by icarus?
If there are, what could I be doing wrong?
Thanks
https://github.com/icarus-sim/icarus/blob/master/icarus/util.py#L742
Try for example apportionment(99, [0.2,0.7,0.1])
The root cause is that divmod
returns floats, not ints. You can cast the items in the ints
list to ints or just cast to_alloc
to an int.
Code:
idx = heapq.nlargest(to_alloc, range(len(remainders)), remainders.__getitem__)
Result:
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/heapq.py", line 470, in nlargest
result = _nlargest(n, it)
TypeError: integer argument expected, got float
Dr. Lorenzo
thank so much for reply on the ICN Mailing-list. Anyway I have tried your instructions and this is what I get:
abdou@sdn-ccn:~/icarus$ python scripts/printresults.py results.pickle > results.txt
Traceback (most recent call last):
File "scripts/printresults.py", line 8, in
from icarus.registry import RESULTS_READER
ImportError: No module named icarus.registry
See if you can still help, thank you and sorry for bothering you.
Abdou Darboe
Wireless Internet Service Engineering Lab
NDHU, Hualien.
Taiwan, ROC
Hi,
When I try to run the examples in the example folder (lce-vs-probcache) with command "icarus run --results test.pickle config.py", I got this error:
Traceback (most recent call last):
File "/zijia/RL-NDN/Icarus/icarus/icarus/scenarios/workload.py", line 121, in iter
raise StopIteration()
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/zijia/RL-NDN/Icarus/icarus/icarus/orchestration.py", line 279, in run_scenario
results = exec_experiment(topology, workload, netconf, strategy, cache_policy, collectors)
File "/zijia/RL-NDN/Icarus/icarus/icarus/execution/engine.py", line 59, in exec_experiment
for time, event in workload:
RuntimeError: generator raised StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/icarus", line 33, in
sys.exit(load_entry_point('icarus', 'console_scripts', 'icarus')())
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/zijia/RL-NDN/Icarus/icarus/icarus/main.py", line 42, in run
icarus.run(config, results, config_override)
File "/zijia/RL-NDN/Icarus/icarus/icarus/runner.py", line 112, in run
orch.run()
File "/zijia/RL-NDN/Icarus/icarus/icarus/orchestration.py", line 126, in run
self.n_exp))
File "/zijia/RL-NDN/Icarus/icarus/icarus/orchestration.py", line 289, in run_scenario
err_type = str(type(e)).split("'")[1].split(".")[1]
IndexError: list index out of range
Also, when I run offpath-vs-onpath-caching example, I got something like this:
[06:30:59 2020-07-02|INFO|runner-ForkPoolWorker-7] Experiment 251/1536 | Start simulation
[06:30:59 2020-07-02|ERROR|orchestration] FAILURE | Experiment failed: list index out of range
[06:30:59 2020-07-02|ERROR|orchestration] FAILURE | Experiment failed: list index out of range
[06:31:00 2020-07-02|ERROR|orchestration] FAILURE | Experiment failed: list index out of range
Could you tell me what should I do to fix this issue? Thank you!
Hello Sir,
I am facing some problems with running 'HR_EDGE_CACHE'
, 'HR_ON_PATH'
and 'HR_CLUSTER'
strategies which are not shown in the examples. When I try to run any of these strategies, the error shows :
ERROR|orchestration] FAILURE | Experiment failed: list index out of range
I have assigned 'MULTICAST' for 'HR_EDGE_CACHE'
, 'HR_ON_PATH'
and 'HR_CLUSTER'
.
Here is my errors, config and hashrouting files. Kindly have a look.
Errors.txt
config.txt
hashrouting.txt
Am I missing something? It will be great if you help me out, sir!
Hi,
Sorry for bothering you, this is my second question, I'd like to do an experiment for RL-based caching strategy, so I need to modify write a new class for the new RL-based strategy, do I need to run "make install" again when I add the new class to "policies.py"?
Or could you give me some instructions on how to modify it if there is a simpler method?
Good day, sir!
Hello Sir,
Firstly, a thousand thanks for providing this powerful tool for cache simulation. But during use, we found possible problems in the cache placement scenario (DEGREE and BETWEENNESS_CENTRALITY methods).
In DEGREE, the source code calculates and sums the degree of all nodes, however, only nodes from 'icr_candidates' are allocated cache budget. This will result in the cache budget not being fully allocated. Same thing in BETWEENNESS_CENTRALITY.
Some topologies got the wrong allocating result (like TISCALI and GEANT), some are right (like GARR).
Am I misunderstanding something? Looking forward to your response.
Hi, how to run the "numeric_cache_hit_ratio_2_layers" replacement policy in https://github.com/icarus-sim/icarus/blob/master/icarus/tools/cacheperf.py
Dr. Lorenzo
i am trying to plot the results from txt file in Icarus. I dont understand what will i do? please help me out.
i am very thankful.
Hello, I am facing an error when I increase the following parameters:
(I implemented these parameters on my strategy)
N_WARMUP_REQUESTS = 1* 10 ** 3 --to---> N_WARMUP_REQUESTS = 6* 10 ** 4
N_MEASURED_REQUESTS = 1* 10 ** 3 ----to-----> N_MEASURED_REQUESTS = 6* 10 ** 4
NETWORK_CACHE = [0.01,0.02,0.03] -----to----> NETWORK_CACHE = [0.01,0.015,0.02,0.025,0.03]
[00:23:05 2023-07-04|INFO|runner-ForkPoolWorker-3] Experiment 25/72 | Start simulation
[00:23:12 2023-07-04|ERROR|orchestration] FAILURE | Experiment failed: list index out of range
(icarus) D:\icarus>icarus run --results results.pkl config.py
Traceback (most recent call last):
File "G:\envs\icarus\Scripts\icarus-script.py", line 11, in
load_entry_point('icarus==0.8.0', 'console_scripts', 'icarus')()
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 1025, in call
return self.main(*args, **kwargs)
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 955, in main
rv = self.invoke(ctx)
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 1517, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 1279, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 710, in invoke
return callback(*args, **kwargs)
File "G:\envs\icarus\lib\site-packages\icarus-0.8.0-py3.8.egg\icarus\main.py", line 42, in run
icarus.run(config, results, config_override)
File "G:\envs\icarus\lib\site-packages\icarus-0.8.0-py3.8.egg\icarus\runner.py", line 109, in run
for sig in (signal.SIGTERM, signal.SIGINT, signal.SIGHUP, signal.SIGQUIT, signal.SIGABRT):
AttributeError: module 'signal' has no attribute 'SIGHUP'
Hello, I am trying to execute the simulation examples. However, I ended up with the following error:
~/Downloads/icarus-0.7.0/examples/lce-vs-probcache$ icarus run --results results.pickle config.py
[16:05:07 2018-12-03|WARNING|main] RESULTS_FORMAT setting not specified. Set to PICKLE
[16:05:07 2018-12-03|WARNING|main] LOG_LEVEL setting not specified. Set to INFO
[16:05:07 2018-12-03|INFO|main] Launching orchestrator
[16:05:07 2018-12-03|INFO|orchestration] Starting simulations: 2 experiments, 1 process(es)
[16:05:07 2018-12-03|ERROR|runner-MainProcess] Experiment 1/2 | Failed | IOError:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/orchestration.py", line 215, in run_scenario
topology = TOPOLOGY_FACTORY[topology_name](**topology_spec)
File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/scenarios/topology.py", line 730, in topology_rocketfuel_latency
topology = fnss.parse_rocketfuel_isp_latency(f_topo).to_undirected()
File "/usr/local/lib/python2.7/dist-packages/fnss-0.8.2-py2.7.egg/fnss/topologies/parsers.py", line 199, in parse_rocketfuel_isp_latency
with open(latencies_path, "r") as f:
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/resources/topologies/rocketfuel-latency/1221/latencies.intra'
[16:05:07 2018-12-03|ERROR|runner-MainProcess] Experiment 2/2 | Failed | IOError:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/orchestration.py", line 215, in run_scenario
topology = TOPOLOGY_FACTORY[topology_name](**topology_spec)
File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/scenarios/topology.py", line 730, in topology_rocketfuel_latency
topology = fnss.parse_rocketfuel_isp_latency(f_topo).to_undirected()
File "/usr/local/lib/python2.7/dist-packages/fnss-0.8.2-py2.7.egg/fnss/topologies/parsers.py", line 199, in parse_rocketfuel_isp_latency
with open(latencies_path, "r") as f:
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/resources/topologies/rocketfuel-latency/1221/latencies.intra'
[16:05:07 2018-12-03|INFO|orchestration] END | Planned: 2, Completed: 2, Succeeded: 0, Failed: 2
[16:05:07 2018-12-03|INFO|main] Orchestrator finished
[16:05:07 2018-12-03|INFO|main] Saved results to file /home/boubakr/Downloads/icarus-0.7.0/examples/lce-vs-probcache/results.pickle
Hi Lorenzo,
I'd like to run experiments, but using different content placement algorithms in cache nodes. I'll describe what I'm trying to do:
Obs: I'm assuming that each content request is composed of a list of contents and not a single one. for example: req = [1, 3, 6]. Moreover, each request may be variable-length or fixed-length.
1 - Collect a data-set containing content requests used in a sample experiment.
2 - Split the data-set into training and test. In the training one, I intend to find out patterns in such requests in order to perform a content placement based on them. Once the patterns are found, my proposal, in an off-line manner, places these content on cache nodes. So, my network.py file would be like this:
policy_name = cache_policy['name']
policy_args = {k: v for k, v in cache_policy.items() if k != 'name'}
# The actual cache objects storing the content
self.cache = {node: CACHE_POLICY[policy_name](cache_size[node], **policy_args)
for node in `cache_size}`
for node in self.cache:
contents = [
[1,2,3],
[4,5],
[5,6,7,8]
]
for content in contents:
self.cache[node].put_contents(random.choice(contents))
3 - At the test phase, the content requests are performed, but now having already placed the contents found in the training phase and compare the results with the other available proposals.
I'm having some problems during simulation because when engine.py gets the NetworModel from network.py file to be used on the simulation, all the policies to be evaluated will use the same content allocation (in this case, the one I obtained in the training phase and described above). What I'd like to have is that my proposal would use its own NetworkModel, with its own content allocation scheme, and the other proposal would use the baseline one, provided on Icarus.
I tried to design two different NetworkModels on network.py to be used by engine.py, but didn't work. Follow is a sample of my code:
obs: I replaced strategy by policy, but it is not the cache policy itself.
def exec_experiment(topology, workload, netconf, policy, cache_policy, collectors):
model_baseline = NetworkModelBaseLine(topology, cache_policy, **netconf)
model_proposal = NetworkModelProposal(topology, cache_policy, **netconf)
view_baseline = NetworkViewBaseLine(model_baseline)
view_proposal = NetworkViewProposal(model_proposal)
controller_baseline = NetworkController(model_baseline)
controller_proposal = NetworkController(model_proposal)
collectors_inst_baseline = [DATA_COLLECTOR[name](view_baseline, **params)
for name, params in collectors.items()]
collector_baseline = CollectorProxy(view_baseline, collectors_inst_baseline)
controller_baseline.attach_collector(collector_baseline)
policy_name_baseline = policy['name']
policy_args_baseline = {k: v for k, v in policy_baseline.items() if k != 'name' and policy_name_baseline == 'SAMPLE_POLICY'}
policy_inst_baseline = POLICY[policy_name_baseline](view_baseline, controller_baseline, **policy_args_baseline)
collectors_inst_proposal = [DATA_COLLECTOR[name](view_proposal, **params)
for name, params in collectors.items()]
collector_proposal = CollectorProxy(view_proposal, collectors_inst_proposal)
controller_proposal.attach_collector(collector_proposal)
policy_name_proposal = policy_proposal['name']
policy_args_proposal = {k: v for k, v in policy_proposal.items() if k != 'name' and policy_name_proposal== 'PROPOSAL'}
policy_inst_proposal = POLICY[policy_name_proposal](view_proposal, controller_proposal, **policy_args_proposal)
for time, event in workload:
policy_inst_baseline.process_event(time, **event)
policy_inst_proposal.process_event(time, **event)
return collector_baseline.results(), collector_proposal.results()
Could you please help me how to make each policy uses its corresponding NetworkModel and run with the correct scenario?
Best Regards,
Igor.
After the completion of simulation in ubuntu there was error as
IOError: [Errno 13] Permission denied: 'results.pickle'
any help why this error occurs?
Hello
I want to take fog processing in Icarus simulator
So that the content selection strategy is done by the fog nodes, but I don't know how to define the fog nodes in the simulator
I had installed PyResonance and related packages as per Github.
When i try to run PyResonance i get an error as follows:
mininet@mininet-vm:~/pyretic$ pyretic.py pyretic.pyresonance.main --config=./pyretic/pyresonance/global.config --mode=manual
*** Specified Modules are: ***
pyretic.pyresonance.apps.auth (auth)
pyretic.pyresonance.apps.ids (ids)
*** The Policy Composition is: ***
auth >> ids
start-frenetic.sh: line 5: ./frenetic: No such file or directory
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
Connected to pyretic frontend.
INFO:core:POX 0.2.0 (carp) is up.
INFO:openflow.of_01:[00-00-00-00-00-01 3] connected
INFO:openflow.of_01:[00-00-00-00-00-03 1] connected
INFO:openflow.of_01:[00-00-00-00-00-02 2] connected
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in **bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, *_self.__kwargs)
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 2326, in f
self.runtime.handle_network_change()
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 465, in handle_network_change
self.update_switch_classifiers()
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 553, in update_switch_classifiers
classifier = self.whole_policy_compile()
File "/home/mininet/pyretic/pyretic/evaluations/stat.py", line 158, in profiled_func
res = func(_args, _kwargs)
File "/home/mininet/pyretic/pyretic/evaluations/stat.py", line 109, in profiled_func
res = func(_args, _kwargs)
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 514, in whole_policy_compile
p = cp.netkat_compile(self.sw_cnt())[0] # directly compile with netkat
File "/home/mininet/pyretic/pyretic/core/language.py", line 186, in netkat_compile
server_port=server_port)
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 158, in generate_classifier
(cls_json, ctime) = httplib_channel_compilation(pol)
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 126, in httplib_channel_compilation
json_input = compile_to_netkat(pol)
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 494, in compile_to_netkat
return json.dumps(to_pol(pyretic_pol))
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 423, in to_pol
from pyretic.evaluations.Tests.common_modules.stanford_forwarding import StanfordForwarding
File "/home/mininet/pyretic/pyretic/evaluations/Tests/__init.py", line 6, in
module = loader.find_module(module_name).load_module(module_name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/mininet/pyretic/pyretic/evaluations/Tests/congested_link/init.py", line 6, in
module = loader.find_module(module_name).load_module(module_name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/mininet/pyretic/pyretic/evaluations/Tests/congested_link/Topos/init.py", line 6, in
module = loader.find_module(module_name).load_module(module_name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/mininet/pyretic/pyretic/evaluations/Tests/congested_link/Topos/FatTree.py", line 1, in
import fnss
ImportError: No module named fnss
In your example,you have set the bar chart title, however, there's no title in the bar chart
From what I know so far, all events are added to the workload and executed serially one by one. Is it possible to change it to simulate multiple parallel requests as it usually happens in real-world?
I had another question about the file size, currently it assumes that all files are of unit length. I plan to add another attribute called file size and make the necessary changes to the caching policies. Is there any other part of the code that I need to take care of to implement this change?
I am trying to run icarus with cocotb and get the following error. Due to 'vpl' I was thinking its probably coming from icarus.
Can someone please help
/opt/homebrew/bin/vvp -M /opt/homebrew/lib/python3.9/site-packages/cocotb/share/makefiles/build/libs/arm64 -m gpivpi sim_build/sim.vvp
gpivpi:`/opt/homebrew/lib/python3.9/site-packages/cocotb/share/makefiles/build/libs/arm64/gpivpi.vpl' failed to open using dlopen() because:
dlopen(/opt/homebrew/lib/python3.9/site-packages/cocotb/share/makefiles/build/libs/arm64/gpivpi.vpl, 0x0009): symbol not found in flat namespace '_PyErr_Print'.
thanks
Hi,
My name is Madhu. I am currently working on a research paper based on 'content popularity prediction and caching in fog nodes'. One of the reference papers has used the Icarus tool for simulation.
I would like to know the process of
Kindly help me with this issue. Thanks a lot in advance.
Hello
I get the following error when I use the following PERFECT LFU cache policy together with the ttl_cache function and increase the following parameters.This problem exists on most of the existing strategies (such as CL4M)
params
N_WARMUP_REQUESTS = 1* 10 ** 3 --to--> N_WARMUP_REQUESTS = 6* 10 ** 4
N_MEASURED_REQUESTS = 1* 10 ** 3 ----to---> N_MEASURED_REQUESTS = 6* 10 ** 4
error
ERROR|orchestration] FAILURE | Experiment failed: list index out of range
Hi,
May I check whether you have a limitation on assign statements for version 0.9.7 and 0.9.8 of icarus?
Seems like assigns work only when constant values are assigned.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.