12th in-depth research on tinyviz and tossim-Maximum number of nodes (network size)

Source: Internet
Author: User
Tags win32 error intel pentium

 

My research project is based on topology control on a super-large sensor network with thousands or even tens of thousands of nodes. Therefore, the maximum number of nodes has become my biggest concern.

 

This Digest self-Research Progress Report

To test the scalability of tinyos and tossim that I am
Using, I tried to test partition different testing values for tinyos compilation and
Tossim simulation.

 

With using the tinyviz graphic interface, I started
Simulation from 100 nodes. I have tried 100,200,300,400,500,600 and 700
Nodes reprehensively. With the increasing numbers of the nodes, the system
Initial time increased accordingly.

Screenshot 1 successful running of 700 nodes

After 700 nodes, I have tried 800,900 nodes on the same
Platform but I cannot make a successful simulation and the tinyviz console gave
The follow error:

 

Screenshot2 out of memory error for 750 nodes and above
In tinyviz

 

 

Conclusion1:TinyvizIn750Memory overflow error. In factTinyvizShow700Nodes are very dense and difficult to tell by the naked eye. Starting from here,TinyvizIt is no longer considered for use.

I got an out of memory error with 750 nodes. It is the reason for abandoning tinyviz (GUI) from now
On. I continued the testing without the GUI. It was good for simulating nodes
800,900 and less than 1000. However, when I specified the node of 1100, it gave
The follow message: I am compiled for maximum of 1000 nodes and you have specified
1100 nodes.

Screenshot3 1000 nodes

I went to read the tossim documentation and found
Following description:

1.
The official
Introduction of tossim:"Tossim: accurate and scalable simulation
Entire tinyos applications
"

When it talked about the scalability, it said:

The simulator must be able to handle large networks
Thousands of nodes in a wide range of tolerations. The largest tinyos Sensor
Network that has ever been deployed was approximately 850 nodes; the simulator must
Be able to handle this and the much larger systems of the future.

So based on this, I believed they determined the standard
Tinyos node upper bound is 1000.

Then I went another document for tossim:

 

2. Tossim:
Simulator for tinyos Networks

I got this information here:

When compiling for tossim, The NESC compiler modifies
Code Generation for components such that fields declared in components result
In arrays of each field. The maximum number of nodes that can be simulated is
Determined at compile time. It says that the upper bound is specified in
/Apps/makerules. By default, the standard tinyos distribution sets this value
To be 1000.

 

When compiling for the PC, each declaration of
Component field is followed by [, the value of tossim num nodes, and], where
Tossim num nodes is specified by the flag-fnesc-tossim tosnodes = in makerules,
Or by default, set to 1000. This is the way tossim simulates multiple motes.
Tossim keeps an array for each variable of state, and references each Mote's
Corresponding state when running code for that mote.

 

I went to/apps/makerules and edited the flag-fnesc-tossim
Tosnodes = 1200.

Screenshot4 change 1000 to 1200

I saved file and compiled the application again. However,
It did not work. It was still 1000 and did not change.

Screenshot5 still 1000

 

I tried run the application and failed. It gave the same
Error prompt.

Screenshot6 I cannot execute 1100 nodes

I found the official documents ents were cheaters and sent
Email to the tinyos/tossim developers.

I found/opt/tinyos-1.x/tools/make/pc.tar get, and-fnesc-tossim tosnodes, changed
It to 1300.

Screenshot7 change the flag in pc.tar get

Conclusion 2: official documents are deceptive. He makes the changes have no effect. The real modification lies in/opt/tinyos-1.x/tools/make/pc.tar get,
Modify-fnesc-tossim tosnodes.

Screenshot 8 successful run for more than 1000 nodes

 

In fact, we have another way to modify the maximum number of nodes, that is, directly modify the Nido. h file. Similarly, default_eeprom_size can also be specified here:

 

Second, after checking
Library files, I finally found a head file "Nido. h" located here: OPT/tinyos-1.x/TOS/platform/PC.
And saw the code segment:

Enum {

Tosnodes = tosh_num_nodes,

Default_eeprom_size = (512*1024) // 512 KB

};

/* In NESC/nesc-cpp.c,
The tosh_num_nodes macro is defined, so that

Tosnodes is set to the value specified
The NESC compiler by the flag

"-Fnesc-Nido-tosnodes = ___"*/

 

The flag "tosnodes = tosh_num_nodes" is the actual definition
Place of the default Max network size. We must set the tosnodes to tosh_num_nodes,
So we can just edit the flag "-fnesc-tossim
Tosnodes "in the file into pc.tar get" to set the upper bound of default Max nodes
In tossim. Of course, we can specify a value to tosnodes to set the bound
Directly.

 

Conclusion 3: The default tossim running parameters are defined in Nido. H. Many tossim runtime parameters and ports can be found here.

 

To find the maximum number of nodes supported by tossim, we can continue the following experiment:

Since I broke the upper
Bound of 1000, I wanted to know if it was good for 5000-node simulation. Therefore,
I modified "-fnesc-tossim tosnodes" flag to 5000. The compilation is
Successful.

Screenshot 9 successful compilation for 5000 nodes

 

However, it has
EEPROM error during the running time and automatic stop. I kept on tracking on
The Max number of nodes on running time. 4096 (12th power of 2) was the max
Number so far.

Screenshot 10 EEPROM Error

 

I remembered there was
Another flag located in "Nido. h" named default_eeprom_size. This shoshould be
Right place for eeprom_size. I changed it to 1024*1024 and recompiled
Application. Then, a 5000-node simulation worked.

 

 

 

Screenshot 11 successful running for 5000 nodes

 

5000 had been achieved.
I tried 6000,7000, 8000,9000 and failed again at 10000. It had the system error
Of Win32 error 8 and segmentation fault (core dumped). I tried to get to Max
Number and tested for a lot of times. I finally got9324As the Max that we cocould
Achieve. I did not know why this was the final one. It was not some power of 2
And it seemed strange.

Screenshot 12 core dumped when REACH 10000 nodes

 

Conclusion 4: the maximum number of nodes that tossim can simulate is 9324. If the number exceeds the limit, it cannot run. The error is segmentation fault. The cause of the error is unknown. However, it is estimated that it is a memory problem based on personal experience.

 

The platform for the above experiments is:
Hardware platform is Intel Pentium 4 with 1g memory.

The software is Microsoft Window XP 32bit and tinyos 1.3
Run on cygwin.

 

Later, I re-performed all the above experiments on the new PC in the lab. The conclusions are the same.

The
Hardware platform is Intel i7 950 with 24g memory (yes, you are not mistaken, either 2g, 4G or 24g memory ).

The software is Microsoft Window 7 64bit and Vm (Win XP 32 bit) tinyos 1.3 run on
Cygwin.

 

No64BitXPIn fact, I only allocate3GMemory. It does not make sense if it is too many.

So there is no4GThe above memory has runTinyos1.3, Do not know in64Is there any improvement in the BIT system? OrTinyos1.xSupported?64?

I am learning to useUbuntu10.04
64bit
RunTinyos1.xBut the installation is a problem:

First,
No tutorial inLinux
64
Bit system installationTinyos1.x

Second,
InLinux
64
Bit InstallationJavaBoth are painful.

Third,
SourceForgeOfCVSLogin fails, which is very painful.

If you have solved the problem, please kindly advise. Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.