What to do if religion of dead person not known? Should we perform janaza?

If there are indications that the person was Muslim, or came from a Muslim family, or had Muslims, then yes the Janaza rites must be performed. But if the person died in a non-Muslim society and there are no indications that he was Muslim, then it’s not mandatory to perform the Janaza rites.