Re: insulate crawlspace ceiling, walls, or both??
If it's in the budget then applying the foam to the underside of the floor as well as the perimeter walls would be a very good way to go .... providing the vents are closed.
Otherwise if the vents remain it's a waste of money and material insulating the perimeter walls.
Depending if you are using the closed cell spray foam .... you could have a 3 inch layer applied to the underside of the floor .... giving approx. R21 and reuse the batt insulation as well ... giving approx R39/40.
2 inch closed cell foam applied to the perimeter walls will give around R14.
Hope this helps.
"" an ounce of perception -- a pound of obscure "