I think above a few months, imprisonment probably isn't the answer. We should explore alternatives: corporal punishment (wouldn't you rather a single lash than a year in prison?), fines, slavery (why not make someone who commits manslaughter work for the victim's family for a decade, rather than sit in prison for a decade?) and, yes, execution (which is, I contend, more humane than long-term imprisonment).
I don't really know what the answer is, but I'm pretty certain it doesn't involve years of prison.
I think it literally is, which is why I think requiring it in order to graduate from high school or college is uncouth and unconstitutional (likewise, the draft).
I have no problem with it as a punishment for crime, although I do have concerns about the efficacy and efficiency of how it is administered. Does it make sense for someone with high-value skills to be cleaning toilets as community service?
Possibly that's an appropriate punishment then, for the very worst of offenders.