wiki:ServerDirs

Server directory structure

The directory structure for a typical BOINC project looks like:

PROJECT/
    apps/
    bin/
    cgi-bin/
    log_HOSTNAME/
    pid_HOSTNAME/
    download/
    html/
        inc/
        ops/
        project/
        stats/
        user/
        user_profile/
    keys/
    upload/

where PROJECT is the name of the project and HOSTNAME is the server host. Each project directory contains:

  • apps: application and core client executables
  • bin: server daemons and programs.
  • cgi-bin: CGI programs
  • log_HOSTNAME: log output
  • pid_HOSTNAME: lock files, pid files
  • download: storage for data server downloads.
  • html: PHP files for public and private web interfaces
  • keys: encryption keys
  • upload: storage for data server uploads.

The upload and download directories may contain large numbers (millions) of files. For efficiency they are normally organized as a hierarchy of subdirectories.

Upload and download directory hierarchies

The data server for a large project may store 100Ks or millions of files at a given point. If these files are stored in flat directories the data server may spend a lot of CPU time searching these directories. To avoid this, BOINC uses hierarchical upload and download directories. Each directory has a set of 1024 subdirectories, named 0 to 3ff. Files are hashed (based on their filename) into these directories.

The hierarchies are used for input and output files only. Executables and other application files are in the top level of the download directory.

Normally you don't need to know about these hierarchies. stage_file automatically puts input files in the right place. If for some reason you want to know what directory an input file is in, run the command

bin/dir_hier_path filename

For output files, your validator and assimilator should call

int get_output_file_path(RESULT const& result, string& path);

or

int get_output_file_paths(RESULT const& result, vector<string>& );

to get the paths of output files in the hierarchy.

Last modified 3 years ago Last modified on 03/26/14 14:59:03