update: this question is related to Google Colab\'s \"Notebook settings: Hardware accelerator: GPU\". This question was written before the \"TPU\" option was added.
Last night I ran your snippet and got exactly what you got:
Gen RAM Free: 11.6 GB | Proc size: 666.0 MB
GPU RAM Free: 566MB | Used: 10873MB | Util 95% | Total 11439MB
but today:
Gen RAM Free: 12.2 GB I Proc size: 131.5 MB
GPU RAM Free: 11439MB | Used: 0MB | Util 0% | Total 11439MB
I think the most probable reason is the GPUs are shared among VMs, so each time you restart the runtime you have chance to switch the GPU, and there is also probability you switch to one that is being used by other users.
UPDATED: It turns out that I can use GPU normally even when the GPU RAM Free is 504 MB, which I thought as the cause of ResourceExhaustedError I got last night.