I've been living in Porto Alegre for 10 years. The city is not safe. It's generally less safe than other Brazilian cities like São Paulo, Brasília and Curitiba.
You should avoid the city center at night and on weekends. Avoid neighborhoods with higher drug-related crime rate such as Rubem Berta, Lomba do Pinheiro and Restinga. Avoid being past midnight anywhere.
Stay in residential areas around the city center (Moinhos de Vento, Auxiliadora, Bela Vista).
Here is a crime map (crowdsourced and constantly updated): http://www.ondefuiroubado.com.br/porto-alegre/RS