gl: minize the max size of scratch surface