Skip to content

Instantly share code, notes, and snippets.

@davegreenwood
Last active March 13, 2020 10:54
Show Gist options
  • Save davegreenwood/194d379e827ec39c7be6278c4d022cb7 to your computer and use it in GitHub Desktop.
Save davegreenwood/194d379e827ec39c7be6278c4d022cb7 to your computer and use it in GitHub Desktop.
gpu server hints and tips

CMPGPUSVR hints and tips

Server is run on a be polite policy - it's not a right but a privilege :)

Etiquette

There are two main considerations for users.

GPU

Don't launch a GPU job without checking there is available resources. You can check this with nvidia-smi to see how many GPUs are in use.

Disk space

The other issue is disk space. The boot drive is quite small, so users need to read and write files to the much larger drive at /data. A nice way of doing this is to make a folder and alias it to your home drive.

mkdir /data/<username>
ln -s /data/<username> ~/data

Tips

The Linux package screen is useful when running multiple jobs, a few useful cmds are:

  • screen -S <screenname> starts a new screen and attaches you
  • crtl-a d detaches you from an attached screen
  • screen -r <screenname> re-attaches you to the chosen screen
  • screen -XS <screenname> quit kills a chosen screen from a detached state

Once a job is running in a screen you can detach, then logout of the server; the job will keep running.

Some useful commands:

  • nvidia-smi You should use this frequently to make sure there are GPU resources available. don't crash other jobs by asking for too much memory.

  • du -hs . Gives a summary of the disk space used by the current directory. This should be as small as possible in your home directory.

  • df -h . This gives the free space on the drive of the current directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment