It is best to keep a space cushion:

To ensure that you will have time to react to hazards on the roadway, it is best to keep a cushion of space on all sides of your vehicle. Do not crowd vehicles to your left and right sides.
DMV Writen Test