I loved Hanoi, but I wouldn't call it quiet or peaceful. For that, I'd recommend Hoi An. It's near to Da Nang, which is a much smaller city than Hanoi or Ho Chi Minh City (the population of Da Nang is a little more than 1.2 million, from a Google search). I haven't actually been to Da Nang so I won't try to sing its praises, but I loved the central area of Vietnam that both these cities are in. While traveling through Vietnam, I met many people who ended up staying in Hoi An for a long time to relax or to work. It is on the coast and has some nice beaches in the area. It's really a very relaxed place, albeit pretty touristy (but because it's so touristy, it's also one of the more 'polished' places I'd been in Vietnam - whether that makes it appealing is up to you). For another smaller city, I loved Da Lat. It's in a really beautiful mountainous area. It's north of HCMC but because of the altitude, it stays nice and cool.
If you really want to choose just between Hanoi and HCMC, I'd really recommend Hanoi over the two. While HCMC grew on me by the time I needed to fly out, it was really overwhelming when I first arrived. It's an interesting place but Hanoi has a lot of pros, in my opinion, that make it a better choice than HCMC. The weather is a little bit more tolerable, the old center of the city is pretty charming, and it's not terribly confusing to navigate once you've spent enough time there. It also makes an excellent home base for trips to two of my favorite places in Vietnam: Cat Ba Island (within Ha Long Bay - a less touristy way to see the bay) and Sapa, one of the most beautiful places I've ever traveled to.
Enjoy wherever you end up. Vietnam is a truly beautiful country.