wiki:ConfigurationFile
Last modified 9 years ago Last modified on 06/18/10 11:08:50

Server Configuration File

This page describes the format of the configuration file (as of 21aa840be140cc73b7738392c2efa5aaac3be455 in the master branch).

There is an example configuration file in the repository: defaultconfig.cf.

There is an utility test/configfile that can be used validate the syntax (not the contents!) of the config file. The same functionality is built into the server (see --dumpconfig option).

Log section

The log section controls how the server writes to its output logs. By default, output goes to standard out and log levels lower than INFO are supressed.

The later can be changed by using the environment variable IOFWD_LOGLEVEL. For example:

export IOFWD_LOGLEVEL=debug

Frontend Section

The frontend specifies how clients connect to the server and other transport specific information:

frontend {
	  listen = "tcp://127.0.0.1:1234";
          //
          // bmi buffer pool options
          //
          bmimemorymanager {
          //
          // the max number of bmi buffers that are used at any
          //  point in time
          //  default: 0
          //
          maxnumbuffers = "100";
          }

The example above makes the server listen on tcp port 1234 at localhost.

To control the forwarder the client will use, use the environment variable ZOIDFS_ION_NAME. For example:

export ZOIDFS_ION_NAME=tcp://127.0.0.1:1234 

Requesthandler Section

The requesthandler section controls what happens with a client I/O request once it enters the server. The forwarding server uses a modular architecture, providing multiple modules to handle requests.

In the example below, an incoming request is serviced by the synchronous ZoidFS API. As the server requires

asynchronous I/O internally, the synchronous zoidfs module is wrapped in a defasync module which uses

a thread pool to convert synchronous calls into asynchronous calls. However, all requests will first go to the requestscheduler module which will attempt to merge smaller requests into larger ones and tries to collapse requests for the same file ranges into a single request.

Note how the name key in zoidfsapi specifies the requestscheduler module; Configuration of the requestscheduler module is done in the nested requestscheduler section. The same pattern is repeated within the requestscheduler section. The name key specifies merged requests need to go to the defasync module, which eventually calls the blocking zoidfs module.

requesthandler { 
  zoidfsapi { 
    name = "requestscheduler";
    requestscheduler {
      api = "defasync";
      schedalgo = "merge";
      batchsize = "16";
      rangesched { 
        merger = "hierarchical";
        hierarchical { 
        }
        defquantum = "8";
      }
      defasync { 
        blocking_api = "zoidfs";
        use_thread_pool = "TrUe";
        zoidfs { 
            handlers = ("POSIX" , "SYSIO" , "PVFS2" , "NOFS" , "LOCAL" );
            sysio { 
              driver = "native";
              mountpoint = "/";
              filesystem = "/dev/shm/sysio";
            }
        }
      }
    }
  }

Another useful module is the ratelimiter module. It is capable of shaping I/O traffic by limiting incoming or outgoing bandwidth, number of concurrent requests and the latency of each request.

Like requestscheduler module, the ratelimiter module eventually hands of the request to another module. Therefore, it can be stacked on top of an existing configuration.

For example:

requesthandler { 
  zoidfsapi { 
   name="ratelimit";

   ratelimit { 

    // ratelimiter settings
    op_limit = "0";   // number of operations per second allowed (0 = no limit)
    latency = "0";    // Time in ms by which each operation needs to be delayed
    timerfreq = "1";  // Frequency (in Hz) of rate calculation
    read_bw = "0";    // Allowed read bw in kb/s (0 = no limit)
    write_bw = "0";   // Allowed write bw in kb/s (0 = no limit)
    delay_issue = "0";  // if 0: immediately issue the request but delay response
                        // if 1: delay issuing the request, but not the response

    api = "requestscheduler";
    requestscheduler { 
      api = "defasync";
      schedalgo = "merge";
      batchsize = "16";
      rangesched { 
        merger = "hierarchical";
        hierarchical { 
        }
        defquantum = "8";
      }
      defasync { 
        blocking_api = "zoidfs";
        use_thread_pool = "TrUe";
        zoidfs { 
            handlers = ("POSIX" , "SYSIO" , "PVFS2" , "NOFS" , "LOCAL" );
            sysio { 
              driver = "native";
              mountpoint = "/";
              filesystem = "/dev/shm/sysio";
            }
        }
      }
    }
   }
  }