Forum archive 2000-2006

Arnold K. Pizer - Hint on tmp file system setup

Arnold K. Pizer - Hint on tmp file system setup

by Arnold Pizer -
Number of replies: 0
inactiveTopicHint on tmp file system setup topic started 2/27/2001; 2:47:10 PM
last post 2/27/2001; 2:47:10 PM
userArnold K. Pizer - Hint on tmp file system setup  blueArrow
2/27/2001; 2:47:10 PM (reads: 1403, responses: 0)
If you are using WeBWorK with a substantial number of students (say a hundred or more) you probably should use the following method of setting up tmp directories. This is what we do at Rochester.

The main point is that WeBWorK creates a lot of small temporary (and not so temporary) files and these can use up a lot of inodes (i.e. disk resources) and also slow up backups.

As an aside --- this is not a system setup issue--- every week or two it's a good idea to go to the prof page, then Housekeeping utilities (item 14), and click on remove tmp files and compress the gdbm database. This removes all non latex2html tmp files. It will also substancially reduce the size of the webwork database.

In a standard setup under the html directory for a course you will find a tmp directory. Under that are various directories. Everything under tmp will be recreated if deleted. Since latex2html (l2h), which is used for typeset output, is so slow, we cache the l2h images and these are saved under html/tmp/l2h/ . These l2h files should be kept at least until students no longer are looking at the problems (we keep them all semester). If you remove them, it slows things down since these images have to be recreated. The remove tmp files button referred to above does not delete these files but does delete all other tmp files.

Where the tmp directory for a course is located is determined by the file. What we do at Rochester is create a new file system for all tmp directories from all courses and put it under the htdocs directory: so we have


the tmp directory (file system) is set up with

newfs -i 512 <file system>

so there are plenty of inodes. Also this file system is never backed up. I think by default most OS's, e.g. Solaris, use many fewer inodes.

Under tmp we have a directory for each course, e.g.


We change the file for each course as follows:

# This is the temp directory used by downloadPS, etc

#$courseTempDirectory = "${classDirectory}html/tmp/";
$courseTempDirectory = "/ww/htdocs/tmp/mth142/";


# This is the URL of the course tmp directory. This is for temporary storage of
# html files, images, etc that have to accessible to the webserver. This directory
# contains the subdirectories l2h, gif, eps, and html (not the ${classDirectory}html
# directory). All these subdirectories and their files will be recreated if deleted
# (althought recreating l2h files is time consuminmg). The location of this directory
# may be changed fast disk which is not backed up.

#$courseTempURL = "${htmlURL}tmp/";
$courseTempURL = "/tmp/mth142/";

Also you should note that the access and timing logs can get huge. These are in webwork/system/logs/

By default, these logs are not kept. You can turn on the access log by changing $logAccessData = 0; in the . The timing log keeps track of how fast the server is responding. You can keep track of individual scripts. The most important one is (edit line 40 $main::logTimingData = 1;).

<| Post or View Comments |>