Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge tag 'v3_9_90' into hypervisor
[simgrid.git] / doc / doxygen / platform.doc
index 32c08c5..c2712b6 100644 (file)
@@ -16,7 +16,7 @@ For the latest 2 entries, you have basically 2 ways to give it as an input :
 \li You can use two XML files: a platform description file and a
     deployment description one.
 
-For the deployment stuff, please takea look at \ref deployment
+For the deployment stuff, please take a look at \ref deployment
 
 The platform description may be complicated. This documentation is all
 about how to write this file: what are the basic concept it relies on,
@@ -28,10 +28,10 @@ write a good platform description.
 We choose to use XML because of some of its possibilities: if you're
 using an accurate XML editor, or simply using any XML plug-in for
 eclipse, it will allow you to have cool stuff like auto-completion,
-validation and checking, so all syntaxic errors may be avoided this
+validation and checking, so all syntax errors may be avoided this
 way.
 
-the XML checking is done based on the dtd which is nowaday online at
+the XML checking is done based on the dtd which is nowadays online at
 <a href="http://simgrid.gforge.inria.fr/simgrid.dtd">http://simgrid.gforge.inria.fr/simgrid.dtd</a>
 while you might be tempted to read it, it will not help you that much.
 
@@ -82,7 +82,7 @@ handles two different types of entities (<b>host/router</b> and
 <b>AS</b>) you will have to define routes between those elements. A
 network model have to be provided for AS, but you may/will need,
 depending of the network model, or because you want to bypass the
-default beahviour to defines routes manually. There are 3 tags to use: 
+default behavior to defines routes manually. There are 3 tags to use: 
 \li <b>ASroute</b>: to define routes between two  <b>AS</b>
 \li <b>route</b>: to define routes between two <b>host/router</b>
 \li <b>bypassRoute</b>: to define routes between two <b>AS</b> that
@@ -126,12 +126,12 @@ attributes.
     That also have a big impact on how many information you'll have to
     provide to help the simulator to route between the AS elements.
     <b>routing</b> possible values are <b>Full, Floyd, Dijkstra,
-    DijkstraCache, none, RuleBased, Vivaldi, Cluster</b>. For more
+    DijkstraCache, none, Vivaldi, Cluster</b>. For more
     explanation about what to choose, take a look at the section
     devoted to it below.  
 
 Elements into an AS are basically resources (computers, network
-equipments) and some routing informations if necessary (see below for
+equipments) and some routing information if necessary (see below for
 more explanation).
 
 <b>AS example</b>
@@ -162,15 +162,16 @@ contain more than 1 core. Here are the attributes of a host :
     referring to it.
 \li <b>power (mandatory)</b>:the peak number FLOPS the CPU can manage.
     Expressed in flop/s.
-\li <b>core</b>: The number of core of this host. If setted, the power
-    gives the power of one core. The specified computing power will be
+\li <b>core</b>: The number of core of this host (by default, 1). If
+    you specify the amount of cores, the 'power' parameter is the power 
+    of each core. 
+    For example, if you specify that your host has 6 cores, it will be
     available to up to 6 sequential tasks without sharing. If more
     tasks are placed on this host, the resource will be shared
-    accordingly. For example, if you schedule 12 tasks on the host,
-    each will get half of the computing power. Please note that
-    although sound, this model were never scientifically assessed.
+    accordingly. For example, if you schedule 12 tasks on that host,
+    each will get half of the specified computing power. Please note
+    that although sound, this model were never scientifically assessed.
     Please keep this fact in mind when using it.
-
 \li <b>availability</b>: specify if the percentage of power available.
 \li <b>availability_file</b>: Allow you to use a file as input. This
     file will contain availability traces for this computer. The
@@ -190,7 +191,7 @@ between some storage resource and the <b>host</b>. Please refer to the
 storage doc for more information.
 
 An host can also contain the <b>prop</b> tag. the prop tag allows you
-to define additional informations on this host following the
+to define additional information on this host following the
 attribute/value schema. You may want to use it to give information to
 the tool you use for rendering your simulation, for example.
 
@@ -285,7 +286,7 @@ A <b>cluster</b> represents a cluster. It is most of the time used
 when you want to have a bunch of machine defined quickly. It must be
 noted that cluster is meta-tag : <b>from the inner SimGrid point of
 view, a cluster is an AS where some optimized routing is defined</b>.
-The default inner organisation of the cluster is as follow:
+The default inner organization of the cluster is as follow:
 
 \verbatim
                  _________
@@ -300,7 +301,7 @@ The default inner organisation of the cluster is as follow:
 \endverbatim
 
 You have a set of <b>host</b> defined. Each of them has a <b>link</b>
-to a central backbone (backbone is a <b>link</b> itsef, as a link can
+to a central backbone (backbone is a <b>link</b> itself, as a link can
 be used to represent a switch, see the switch or <b>link</b> section
 below for more details about it). A <b>router</b> gives a way to the
 <b>cluster</b> to be connected to the outside world. Internally,
@@ -323,7 +324,7 @@ There is an alternative organization, which is as follow :
 
 The principle is the same, except we don't have the backbone. The way
 to obtain it is simple : you just have to let bb_* attributes
-unsetted.
+unset.
 
 
 
@@ -347,11 +348,11 @@ unsetted.
 \li <b>sharing_policy</b>: sharing policy for the links between nodes
     and backbone (if any). See <b>link</b> section for syntax/details.     
 \li <b>bb_bw </b>: bandwidth for backbone (if any). See <b>link</b>
-    section for syntax/details. If both bb_* attributes are ommited,
+    section for syntax/details. If both bb_* attributes are omitted,
     no backbone is created (alternative cluster architecture described
     before). 
 \li <b>bb_lat </b>: latency for backbone (if any). See <b>link</b>
-    section for syntax/details. If both bb_* attributes are ommited,
+    section for syntax/details. If both bb_* attributes are omitted,
     no backbone is created (alternative cluster architecture described
     before).
 \li <b>bb_sharing_policy</b>: sharing policy for the backbone (if
@@ -394,11 +395,13 @@ A <b>peer</b> represents a peer, as in Peer-to-Peer (P2P). Basically,
 as cluster, <b>A PEER IS INTERNALLY INTERPRETED AS AN \<AS\></b>. It's
 just a kind of shortcut that does the following :
 
+\li It creates a tiny AS whose routing type is cluster
 \li It creates an host
 \li Two links : one for download and one for upload. This is
     convenient to use and simulate stuff under the last mile model (as
-    ADSL peers).  
-\li It creates a gateway that serve as entry point for this peer zone.
+    ADSL peers). 
+\li It connects the two links to the host
+\li It creates a router (a gateway) that serve as entry point for this peer zone.
     This router has coordinates.
 
 <b>peer</b> attributes :
@@ -417,6 +420,27 @@ just a kind of shortcut that does the following :
 \li <b>state_file </b>: state file for the peer. Same as host state
     file. See <b>host</b> description for details. 
 
+In term of XML, the <b>peer</b> construct can be explained as follows: it transforms
+\verbatim
+  <peer id="FOO"
+       coordinates="12.8 14.4 6.4"
+       power="1.5Gf"
+       bw_in="2.25GBps"
+       bw_out="2.25GBps"
+       lat="500us" />
+\endverbatim
+into
+\verbatim
+   <AS id="as_FOO" routing="Cluster">
+      <host id="peer_FOO" power="1.5Gf"/>
+      <link id="link_FOO_UP" bandwidth="2.25GBps" latency="500us"/>
+      <link id="link_FOO_DOWN" bandwidth="2.25GBps" latency="500us"/>
+      <router id="router_FOO" coordinates="25.5 9.4 1.4"/>
+      <host_link id="peer_FOO" up="link_FOO_UP" down="link_FOO_DOWN"/>
+   </AS>
+\endverbatim
+
+
 \subsection pf_ne Network equipments: links and routers
 
 You have basically two entities available to represent network entities:
@@ -623,12 +647,12 @@ resources tags. This should moved to attributes soon or later.
 In order to run fast, it has been chosen to use static routing within
 SimGrid. By static, it means that it is calculated once (or almost),
 and will not change during execution. We chose to do that because it
-is rare to have a real deficience of a resource ; most of the time, a
+is rare to have a real deficiency of a resource ; most of the time, a
 communication fails because the links are too overloaded, and so your
 connection stops before the time out, or because the computer at the
 other end is not answering.
 
-We also chose to use shortests paths algorithms in order to emulate
+We also chose to use shortest paths algorithms in order to emulate
 routing. Doing so is consistent with the reality: RIP, OSPF, BGP are
 all calculating shortest paths. They have some convergence time, but
 at the end, so when the platform is stable (and this should be the
@@ -750,12 +774,6 @@ DijsktraCache example :
 \subsubsection pf_rm_me Manually-entered route models
 
 \li <b>Full</b>: You have to enter all necessary routes manually
-\li <b>RuleBased</b>: Rule-Based routing data; same as Full except you
-    can use regexp to express route. As SimGrid has to evaluate the
-    regexp, it's slower than Full, but requires less memory. Regexp
-    syntax is similar as <a href="http://www.pcre.org">pcre</a> ones,
-    as this is the lib SimGrid use to do so.
-
 
 Full example :
 \verbatim
@@ -767,54 +785,6 @@ Full example :
  </AS>
 \endverbatim
 
-RuleBased example :
-\verbatim
-<AS id="AS_orsay" routing="RuleBased" >
-                       <cluster id="AS_gdx" prefix="gdx-" suffix=".orsay.grid5000.fr"
-                               radical="1-310" power="4.7153E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_gdx" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_netgdx" prefix="netgdx-" suffix=".orsay.grid5000.fr"
-                               radical="1-30" power="4.7144E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_netgdx" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_orsay" routing="Full">
-                               <router id="gw_orsay"/>
-                       </AS>
-                       <link   id="link_gw_orsay" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.orsay.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.orsay.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.orsay.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.orsay.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-\endverbatim
-
-The example upper contains $1src and $1dst. It's simply a reference to
-string matching regexp enclosed by "()" within respectively <b>src</b>
-and <b>dst</b> attributes. If they were more than 1 "()", then you
-could referer to it as $2src, $3src and so on.
-
 \subsubsection pf_rm_sf Simple/fast models
 
 \li <b>none</b>: No routing (Unless you know what you are doing, avoid
@@ -854,15 +824,15 @@ Consider the example below:
    </route>
 \endverbatim
 
-The route here fom host Alice to Bob will be first link1, then link2,
+The route here from host Alice to Bob will be first link1, then link2,
 and finally link3. What about the reverse route ? <b>route</b> and
 <b>ASroute</b> have an optional attribute <b>symmetrical</b>, that can
 be either YES or NO. YES means that the reverse route is the same
-route in the inverse order, and is setted to YES by default. Note that
+route in the inverse order, and is set to YES by default. Note that
 this is not the case for bypass*Route, as it is more probable that you
 want to bypass only one default route.
 
-For an ASroute, things are just sligthly more complicated, as you have
+For an ASroute, things are just slightly more complicated, as you have
 to give the id of the gateway which is inside the AS you're talking
 about you want to access ... So it looks like this :
 
@@ -894,7 +864,7 @@ a <b>link_ctn</b> is the tag that is used in order to reference a
 \subsubsection pf_asro ASroute
 
 ASroute tag purpose is to let people write manually their routes
-between AS. It's usefull when you're in Full or Rule-based model.
+between AS. It's useful when you're in Full model.
 
 <b>ASroute</b> attributes :
 \li <b>src (mandatory)</b>: the source AS id.
@@ -909,15 +879,6 @@ between AS. It's usefull when you're in Full or Rule-based model.
     will be the opposite of the one defined. Can be either YES or NO,
     default is YES.
 
-<b>Example of ASroute with RuleBased</b>
-\verbatim
-<ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.orsay.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-\endverbatim
 <b>Example of ASroute with Full</b>
 \verbatim
 <AS  id="AS0"  routing="Full">
@@ -948,9 +909,9 @@ between AS. It's usefull when you're in Full or Rule-based model.
 The principle is the same as ASroute : <b>route</b> contains list of
 links that are in the path between src and dst, except that it is for
 routes between a src that can be either <b>host</b> or \b router and a
-dst that can be either <b>host</b> or \b router. Usefull for Full and
-RuleBased, as well as for the shortest-paths based models, where you
-have to give topological informations.
+dst that can be either <b>host</b> or \b router. Useful for Full 
+as well as for the shortest-paths based models, where you
+have to give topological information.
 
 
 <b>route</b> attributes :
@@ -1183,7 +1144,7 @@ and close tag in order to let it work.
 
 \subsection pf_tra trace and trace_connect
 Both tags are an alternate way to passe availability, state, and so on
-files to entity. Instead of refering to the file directly in the host,
+files to entity. Instead of referring to the file directly in the host,
 link, or cluster tag, you proceed by defining a trace with an id
 corresponding to a file, later an host/link/cluster, and finally using
 trace_connect you say that the file trace must be used by the entity.
@@ -1206,7 +1167,7 @@ All constraints you have is that <b>trace_connect</b> is after
     referring to it.
 \li <b>file</b>: filename of the file to include. Possible values :
     absolute or relative path, syntax similar to the one in use on
-    your system. If ommited, the system expects that you provide the
+    your system. If omitted, the system expects that you provide the
     trace values inside the trace tags (see below).
 \li <b>trace periodicity (mandatory)</b>: trace periodicity, same
     definition as in hosts (see upper for details).
@@ -1232,8 +1193,8 @@ Here is an example  of trace when no file name is provided:
 
 \section pf_hints Hints and tips, or how to write a platform efficiently
 
-Now you should know at least the syntax dans be able to create a
-platform. However, after having ourselves wrote some platforms, there
+Now you should know at least the syntax and be able to create a
+platform by your own. However, after having ourselves wrote some platforms, there
 are some best practices you should pay attention to in order to
 produce good platform and some choices you can make in order to have
 faster simulations. Here's some hints and tips, then.
@@ -1248,7 +1209,7 @@ only one host, then you'll also loose all the good AS hierarchy can
 give you. Remind you should always be "reasonable" in your platform
 definition when choosing the hierarchy. A good choice if you try to
 describe a real life platform is to follow the AS described in
-reality, since this kind og trade-off works well for real life
+reality, since this kind of trade-off works well for real life
 platforms.
 
 \subsection pf_exit_as Exit AS: why and how
@@ -1328,14 +1289,37 @@ complicated in using it, here is an example of it:
 \endverbatim
 
 Coordinates are then used to calculate latency between two hosts by
-calculating the euclidian distance between the two hosts coordinates.
+calculating the euclidean distance between the two hosts coordinates.
 The results express the latency in ms.
 
+Note that the previous example defines a routing directly between hosts but it could be also used to define a routing between AS.
+That is for example what is commonly done when using peers (see Section \ref pf_peer).
+\verbatim
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+<config id="General">
+       <prop id="network/coordinates" value="yes"></prop>
+</config>
+ <AS  id="AS0"  routing="Vivaldi">
+   <peer id="peer-0" coordinates="173.0 96.8 0.1" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us"/>
+   <peer id="peer-1" coordinates="247.0 57.3 0.6" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
+   <peer id="peer-2" coordinates="243.4 58.8 1.4" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
+</AS>
+</platform>
+\endverbatim
+In such a case though, we connect the AS created by the <b>peer</b> tag with the Vivaldi routing mechanism. 
+This means that to route between AS1 and AS2, it will use the coordinates of router_AS1 and router_AS2. 
+This is currently a convention and we may offer to change this convention in the DTD later if needed.
+You may have noted that conveniently, a peer named FOO defines an AS named FOO and a router named router_FOO, which is why it works seamlessly with the <b>peer</b> tag.
+
+
 \subsection pf_wisely Choosing wisely the routing model to use
 
 
 Choosing wisely the routing model to use can significantly fasten your
-simulation/save your time when writing the platform/save tremendeous
+simulation/save your time when writing the platform/save tremendous
 disk space. Here is the list of available model and their
 characteristics (lookup : time to resolve a route):
 
@@ -1353,18 +1337,15 @@ characteristics (lookup : time to resolve a route):
     routes.
 \li <b>none</b>: No routing (usable with Constant network only).
     Defines that there is no routes, so if you try to determine a
-    route without constant network within this AS, SimGrid will raie
+    route without constant network within this AS, SimGrid will raise
     an exception.
-\li <b>RuleBased</b>: Rule-Based routing data (fast initialisation,
-    relatively slow lookup, moderate memory requirements, fully
-    expressive): uses regexp to define routes;
 \li <b>Vivaldi</b>: Vivaldi routing, so when you want to use coordinates
 \li <b>Cluster</b>: Cluster routing, specific to cluster tag, should
     not be used. 
 
 \subsection pf_switch Hey, I want to describe a switch but there is no switch tag !
 
-Actually we did not include swith tag, ok. But when you're trying to
+Actually we did not include switch tag, ok. But when you're trying to
 simulate a switch, the only major impact it has when you're using
 fluid model (and SimGrid uses fluid model unless you activate GTNetS,
 ns-3, or constant network mode) is the impact of the upper limit of