Hypothetically, what if the ship did get over run what would you do then?
Probably board (or seal) myself in one of the holds. I would keep the ship close enough to port so as to make occasional trips into cities for supplies, so hopefully i could find a port hole to escape out of. I would have to swim to shore, but with a life vest even a long swim wouldn't be so taxing, plus my leather armor would not by heavy and a katana doesn't jam when wet and doesn't require extra lbs of ammunition to be carried or left behind.
If escaping isn't an option, the ports and hallways of a ship of that size are small enough that realistically only about 1 or 2 zombies could engage me at a time, which is no problem with a close-quarters weapon like a katana, so hypothetically if i had a few days (those ships are massive) i could clear it myself. Although i'd be scared shitless to sleep on board after that. But in all seriousness, as long as we closed the outside hatches at night while we sleep, the entire ship would be secured even if it were boarded.
Have you ever played Fallout 3?