I tend to set a day aside within good time of the deadline, usually a week or two before. I go off to the library armed with snacks around midday, find a quiet spot and just sit there until it's done. Usually I'll be in there until 8-9pm. I never intended to do this but this is just how I did most of my essays. It was rare that I ever did it bit by bit over different days.
I get too distracted if I stay in my room to do it, found myself cleaning the sink, tidying up, reorganising things etc instead haha.
So in answer to your question, probably 8-9 hours.