In this example, do I release pedal BEFORE beat 1 of the second measure, or ON beat 1 of the second measure?
You 'change' pedal on the new note. Up-down as you play it.
Actually, pedalling would ideally be be rather more subtle than is printed here. I'd do a light 'change' on a lot of the non-chord melody notes. Especially on the G♯ in bar 6. Don't want that smeared with the surrounding A's. There's even a lot to be said for sustaining the bass notes with the fingers and using no pedal at all.
The concept of pedalling in situations such as these is to sustain notes that can't be held with separate fingers.
With very basic triads such as these, there's pretty well no reason to use the pedal at all. What it will do is richen the sound, as it allows the strings to vibrate in sympathy - those which match harmonics of the played notes. It also allows playing to get sloppy, when notes are released too soon, because you can!
The pedalling here will be such that as you press the first note in a new bar, the pedal is quickly let go, and re-pressed before you let go of that new first note. So the change will happen all on that first note. Play, up pedal, down pedal, play next note.
I guess this is actually a pedalling exercise. Half of it (most of it) is unnecessary, as all notes in a bar can be sustained by simply holding them down - there are no big stretches with triads. And most bars have their notes which make up a particular chord. That's an important factor to bear in mind when pedalling. Notes which don't belong with a particular harmony are best unpedalled. As in bar 6, pedalling the A and G♯ together bleeds one into the other. Not a good technique here.
And that F in bar - maybe F♯?