Location, location, location -- It's the No. 1 factor in getting the best real estate, and increasingly, Internet and wireless service too.

Chances are, if you live in or around one of the major cities in the U.S., you have high expectations for good wireless service. After all, that's what you're paying for!

But the differences from city to city can vary drastically.

RootMetrics, an independent wireless research company, looked at the mobile network performance of the 125 most populated U.S. urban areas for the first half of the year, and ranked them based on several factors.

Among them: how often you can get a signal (reliability); how quickly you can connect to the network and download and upload data; the frequency of dropped calls; and how quickly text messages are transmitted.

Top 5 cities for overall wireless performance

1) Atlanta, GA

2) Chicago, IL

3) Knoxville, TN

4) Nashville, TN

5) Jacksonville, FL

RootMetrics found that Nashville and Knoxville finished at the top of several categories, including network reliability, call performance and data performance. Service in the two cities are also markedly improved from last year. In 2014, Nashville was ranked 79th, while Knoxville sat at No. 69.

AT&T (T) and Verizon (VZ) are still the best networks there, but since the beginning of last year, Sprint (S) and T-Mobile (TMUS) have worked quickly to close the gap, according to RootMetrics.

"Nashville and Knoxville show this change, with speeds from Sprint increasing significantly from the first half of 2014 to now. Knoxville benefited as well from a large jump in speeds from T-Mobile when comparing the two periods," RootMetrics says.

Bottom 5 cities

125) Hudson Valley, NY

124) Reno, NV

123) Omaha, NE

122) Colorado Springs, CO

121) El Paso, TX

"Unfortunately for those in Hudson Valley, the poor performances we saw in the first half of 2015 are consistent with what we found in the first half of 2014, when Hudson Valley also fell to the bottom of our rankings," RootMetrics says.

New York City and Los Angeles ranked in the bottom half in nearly all of the categories that RootMetrics measured. New York City ranked 74 out of 125 for overall performance, and Los Angeles, the second biggest urban area, ranked 89.