Los Angeles, New York and Chicago are known in the U.S. for their epic gridlock conditions, but in a global analysis by IBM, the pain of commuting in these cities is rated lower than a number of international cities where drivers say they're a lot more miserable.

Mexico City came out on top in IBM's Commuter Pain Index, which ranks the emotional and economic toll of commuting in 20 international cities. Shenzhen and Beijing tied for second place, followed by Nairobi, Johannesburg, Bangalore, New Delhi, Moscow, Milan, Singapore, Buenos Aires, Los Angeles, Paris, Madrid, New York City, Toronto, Stockholm, Chicago, London and Montreal.

CAR TECH: Had a few too many? Your car's gonna know

IBM found that use of public transportation is up in a number of cities compared with its traffic survey from last year, and an increasing number of respondents said roadway traffic has improved either "somewhat" or "substantially" in the past three years. The biggest movements to public transit are in emerging cities such as Nairobi, Mexico City, Shenzhen, Buenos Aires and Beijing, IBM reports. Among Nairobi residents, 70% said they're taking public transit more often in the last year for their daily commute.

On the downside, IBM logged big increases in the number of people who said roadway traffic has increased their stress levels, upped their anger, and negatively affected their performance at work or school. For example, 86% of the respondents in Beijing, 87% in Shenzhen, 70% in New Delhi and 61% in Nairobi report traffic as a key inhibitor to work or school performance.

Globally, 42% of respondents reported increased stress, and 35% reported increased anger. Some of the biggest increases in traffic-related stress showed up in New York (45% in 2011 vs. 13% in 2010), Los Angeles (44% vs. 21%), Toronto (40% vs. 14%), London (33% vs. 19%), Milan (61% vs. 38%) and Johannesburg (52% vs. 30%).

On the subject of road rage, 11 of 15 cities surveyed in both 2010 and 2011 reported year-over-year increases. In New York, for example, 35% said roadway traffic made them angry in 2011 compared to 14% in 2010. Los Angeles (29% vs. 14%) and Toronto (29% vs. 14%) also reported significant increases in traffic-related anger.

When asked what they would do if they could recoup their time spent commuting, more than half of respondents (56%) said they would spend the time with family and friends; 48% would exercise; 40% would spend more time on recreation; and 29% would sleep more.

IBM's Commuter Pain Index takes into account 10 factors: commuting time, time stuck in traffic, high gas prices, worsening traffic, start-stop traffic, stress caused by driving, anger caused by driving, the effect of traffic on work, traffic so bad driving stopped, and the frequency of drivers deciding not to make a trip due to traffic.

Follow Ann Bednarz on Twitter: twitter.com/annbednarz

Read more about infrastructure management in Network World's Infrastructure Management section.