As you've discovered, an insulated attic doesn't really provide much comfort, even if it does reduce heat flow by some amount. In order to get true second-floor comfort with insulation, you need to really, really improve the amount to R-60 or greater, and you need to use insulation that's opaque to infrared radiation, which fiberglass is not. I suggest adding 10 to 20 inches of loose-blown cellulose on top of the layers of batts.
Insulating your attic at the roofline presents many problems. To build an unvented roofline insulation assembly virtually requires spray foam, which is incredibly expensive in the amounts needed to actually produce comfort. To do this without spray foam requires ventilation channels, reducing the amount of space available between the rafters for insulation unless you fur out the rafters to get more depth or fasten several inches of foam or mineral wool boards underneath them. Finally, you need an airtight layer under that, which usually means drywall, which is a waste if you're not planning to use the space as finished area anyway.
There is an experimental method of doing a much cheaper unvented roof without spray foam and drywall using 4 lb/sf dense-packed cellulose between furred-out rafters, held in place with a vapor retarder (not barrier) membrane like Intello or MemBrain (no affiliation) but, again, this is experimental.
The physics behind what's happening in your attic is that insulation doesn't do anything to reduce the heat flow, it just slows it down. If you don't have enough insulation to slow the heat flow down so much the heat fails to make it through the entire insulation layer during a daily cycle, the heat gets through your ceiling and you feel uncomfortable. Even if it's not a lot of heat, it's enough to raise the temperature of your ceiling plaster or drywall, and that heat radiates down onto your head, and you feel much less comfortable than the air temperature alone would suggest. Having less than the critically large amount of insulation necessary to slow the flow enough will reduce the heat flow and reduce your AC bills, but not enough to prevent comfort problems anyway.
This suggests an alternative approach to adding like two more feet of insulation: actually reduce the heat flow itself with radiant barriers. Don't put it at the roofline; the best place is above the roof sheathing itself, but this may be hard if you don't plan to re-roof soon. The next-best place is above the existing insulation. To prevent dust from degrading its performance, use a type with multiple staggered layers, such as http://www.savenrg.com/upton.htm (No affiliation)