Aws RDS cpu Spike to 100% because of running set isolation command and set
Those are probably bogus.

If you have more than a few dozen connections, they will be stumbling over each other and everyone will progress very slowly.  Keep the number of threads to a realistic number.

autocommit=0 should be outlawed.  It begs the programmer to forget to issue COMMIT.  Without COMMIT, a disconnect (or certain other things) will lead to a ROLLBACK.  Meanwhile, the connections may be blocking each other unnecessarily.

To discuss this further, let's see more details about the "performance test".