Image caption Shallow Grave: "What on earth could make you think we'd want to share this flat with someone like you?"

The high cost of rent in the UK forces many people into multiple-person houseshares. A new documentary asks if it's possible to find the perfect flatmate.

The 1990s black comedy Shallow Grave has always been a kind of cautionary tale for housesharers. Both interviewing people and being interviewed can be unpleasant and it's easy to pick someone who turns out to be a less than delightful match.

Rent has been rocketing in recent years in London and other parts of the UK, taking a one-bedroom flat out of the reach of many people. The Office for National Statistics doesn't measure housesharing specifically, but you can get a feel of numbers from the 2011 census. There were 1,850,137 households which were neither one person nor a family in England and Wales. This accounts for 7.9% of all households, an increase from 6.7% in 2001.

The socially fussy will only share with people who are already friends, or vouched for by a friend. Others opt for particular websites like Gumtree, Spareroom and Moveflat. There are still some who browse the ballpoint pen scrawl on cards in newsagents' windows.

The truly exotic might attend a "speedflatmating" event. Like speed dating, the idea is to allow the tenants to meet several people at the same time without having to go through the process of "interviewing" people one by one.

Image caption This Life: 1990s TV series about a house-share in south London

Being forced together with other people by economics, housesharers want to pick the right person. There are sometimes surprising demands - those wanting food included, or people with multiple unusual pets. A new Channel 4 documentary, How to Find the Perfect Flatmate, explores the difficult process.

Famous house-shares Shallow Grave : 1994 film directed by Danny Boyle - three young professionals left with moral quandary after new housemate dies, leaving bag full of money

: 1994 film directed by Danny Boyle - three young professionals left with moral quandary after new housemate dies, leaving bag full of money This Life : 1990s TV series charting lives and loves of five recently graduated lawyers house-sharing in south London

: 1990s TV series charting lives and loves of five recently graduated lawyers house-sharing in south London Being Human (pictured): Supernatural TV drama about adventures of werewolf, ghost and vampire sharing house

The strangeness of the whole experience is summed up in He Died With A Falafel in His Hand, the memoirs-cum-novel of serial housesharer John Birmingham. When he was picking people to live with he had three questions he always asked:

How will you pay the rent? You'd be surprised at the number of people who couldn't answer that because they had no visible means of support. They just expected to move in and the Buddha would provide.

What sort of music do you listen to? It's not just a matter of controlling the background noise in the house, which is very, very important. Musical choice says a lot about our personalities, about the way we live our lives. I cannot live with a One Direction fan, nor they with me.

Are you crazy? Just ask them up front. It always sends the nutters into a panic spiral and then you can push them out the front door with a long-handled broom.

But there's a serious side to living with strangers. Can they be trusted? Is it safe to be around them? This has to be guessed from a few minutes over a cup of tea with another candidate waiting on the doorstep.

What happens if you get an unreliable alcoholic who happens to visit on his one lucid day?

But bad surprises can happen even with someone who is supposed to be a friend.

Genevieve (not her real name) shared a flat in New York with her boyfriend, a friend and one of their classmates, Ben.

Tips for getting on with your housemates Respect the belongings of others: "You might be used to sharing everything at home... but some people just aren't used to that sort of behaviour."

"You might be used to sharing everything at home... but some people just aren't used to that sort of behaviour." Make a rota: "Chip in, do your bit and everyone will get on like a house on fire"

"Chip in, do your bit and everyone will get on like a house on fire" Talk to your housemates: "Keeping problems bottled up, like when your housemate keeps using your favourite mug... will only cause resentment"

"Keeping problems bottled up, like when your housemate keeps using your favourite mug... will only cause resentment" Listen to your housemates: "Something you don't even think about might leave your housemates grinding their teeth. So just be aware..." Source: National Union of Students

"In September, Ben arrived with no socks in New York, so we each lent him three pairs of socks. As the weeks went by, he still didn't have any socks and we had fewer and fewer socks in our own drawers. All three of us had lost at least five pairs of socks.

"One day during November, we went into his bedroom because we were suspicious. Under the bed we saw a whole stack of dirty socks. When we tried to confront him, he wouldn't listen and told us that we were being childish, that these were 'only socks', that it wasn't a big deal.

"And this was true I guess, but the point was that he had crossed a line. If he was capable of going into our rooms when we weren't there and looking into our stuff, this meant that he was capable of maybe doing something worse."

The whole experience left Genevieve thinking it was better to live with strangers. It avoids the false sense of security at least.

Still, at least vaguely knowing someone before living with them is a comfort to many.

"I can see the appeal of living with someone new and meeting different people. But it's safer to live with someone you know or someone that is a friend of a friend," says Joshi Herrmann, 24, a journalist at the London Evening Standard who lives with three friends.

When you're in your early 20s... it doesn't seem to be so bad to be living with someone who occasionally nicks your milk

Herrmann is dubious about the way potential housemates describe themselves online. "They say things like 'I am very hard working', 'I am very neat and tidy' etc. It's as if they are trying to counter someone's impression of the worst flatmate but actually they make themselves look more boring than anything else."

When he last advertised for someone for a cramped dark room in his houseshare in east London, he got more than 50 messages in the space of a few days. The housemates only met six potentials and in the end picked a friend of a friend.

The theory is that the travails of living with random strangers are best borne when young. When you're skint and in your early 20s it doesn't seem to be so bad to be living with someone who occasionally nicks your milk and plays Sepultura at three in the morning.

But there's a generation of older housemates in many parts of the UK now. Over the past five years, the fastest growing age group of sharers on the SpareRoom website has been 45-54-year-olds, who are up by 50%. The total number of flatsharers over 35 has increased by 26%.

Birmingham says his book struck a chord with people who have lived in houseshares because there are really only five or six houseshare stories in the whole world. There's mad flatmate, bad flatmate, dirty flatmate and so on. Anyone who's done it has had at least one bad experience.

"As long as people share accommodation together, those stories will always be relevant. The archetypes never die. And they never pay their rent."

What are your tips for selecting housemates? Comment on Facebook or tweet your anecdotes with #houseshareheaven or #housesharehell.