If you're talking about 5" from the very top of the carboy neck to the cider level, then it's pretty minimal. Have a blow off tube ready. If you've got 5" from the base of the neck to the top of the liquid, things will be just fine.
I had a similar amount of head space in my last cider batch and was also worried. I added some anti-foaming agent that I picked up at my LHBS. It kept the foaming down to a minimum. Yuri is right though add a blow-off just in case.
Oh my God! Its been 24 hours or so and it smells like a campground shower! YUK! I'm sure that the cider must have had some bugs or something. I washed w/ 5 star and was as careful as possible, but to no avail. Sulpher is pretty gross smelling.