Using Public Computers

  • When running code on a public computer, please remember that other people must be able to use the computer too.

  • If your program will take more than half an hour to run or more than 10 minutes of CPU time please use nice, this will allow others to continue using the computer, by sharing the cpu eg.
    	nice -19 command <  input >  output &  
    
    (If you are a tcsh shell user this -19 becomes a +19)
  • If you forget to nice the process upon starting it, you can use renice to "nice" it while it is running, eg renice 19 process-id. See the manpage for renice for more details. The process id can be obtained by running top or ps. Renice can also be run from within the top command. For Linux: Press "r" for renice, you'll be prompted for the process-id, enter this, press enter/return and then enter the renice value ie 19. For other operating systems: Press "r" for renice then enter 19 followed by the process-id.

  • Check that the computer has enough memory for your program to run , the amount of memory each computer has is stored in the file /etc/motd , use cat /etc/motd to view this file.
    If the computer has to spend a high proportion of its time swapping memory for you or trying to run your program which uses more memory then it, the computer, has then anyone else using it will find it very slow to use.

  • Do not leave the computer locked for a long period of time. If you need to leave a program running, use nohup and it will continue to run after you have logged out.
    nohup nice -19 program-name < input  > output &  
    
  • Do not under any circumstances reboot or turn off the computer, this could lead to other people losing data.

  • Be aware that public computers may be unexpectedly turned off and periodically save the current results of your program to a file. There are also additional departmental guidelines for running long programs.

  • How can my program keep running after a powercut or an unexpected restart Periodically checkpoint your data, ie save the results to a file, then when your program is restarted after the computer is turned back on, the program can read from this file. Note do not keep this file in the directory /tmp, or it may disappear for good when the computer gets turned off.


    Please email any suggestions, corrections, broken links, or errors to itweb [itweb@damtp.cam.ac.uk]