79282438

Date: 2024-12-15 13:44:49
Score: 0.5
Natty:
Report link

Can VT improve performance?

Yes and no, of course.

VTs share a native thread, so they can't run instructions in parallel beyond the OS capability. But as you aim to have them yield when waiting, it should have helped, IF they were not hooked on the same 8 native threads. This needs to be asserted.

(I'll presume you don't have a limit of 8 connections to the DB. It's usually more like 100. You can assert that by temporarily adding a pause to your task after connecting. You can also use a 'sleep(delay)' in mysql, to make statements last longer to prove your tasks can make parallel statements, but you've got a nasty 10 seconds hard statement already. Perhaps there is a difference in the eye of mysqld, but with a 60 seconds pause, you'll have time to show processlist by hand now).

My hypothesis is that there is a thread pool of 1 thread per core underneath this. If you use Thread.currentThread() you won't get anywhere.

If you are on linux, you can write a small java method to read the "/proc/thread-self/status" on each task to get some outsight from the OS (the 'Pid' row in particular). See http://man.he.net/man5/proc . This would prove on which distinct native OS threads your VTs are running.

I don't know for Windoze.

Good luck. Lettuce-snow.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can
Posted by: user2023577