Hi!
>>>>> "roberto" == roberto <Roberto@stripped> writes:
roberto> sorry to disturb you,
roberto> i like to congratulate with you for the efficiency of mysql, it's REALLY
roberto> fantastic !
roberto> I'm a kernel "engineer", i have worked for many international groups for
roberto> embedded systems....
roberto> If you like i can suggest how to boost the performance with nt mysql core,
roberto> so you can bring the same speed of the unix version into winnt version.....
Thanks for the concenr.
roberto> Some rules to gain speed when convert unix programs to win32:
roberto> 1) replace al mutex calls with win32 critical sections ( critical section
roberto> use only 19 cpu instructions )
We are already doing this.
roberto> 2) if you have to protect the simultaneously access to a single 4bytes
roberto> (32bit) var replace criticalsections with
roberto> InterlockedIncrement/Decrement/Etc. api (30% faster than critical sections)
We are already doing this too.
roberto> 3) (this is the major speedup) build a worker thread pool with queing
roberto> mechanism: query a Iocompletionport with GetQueuedCompletionStatus, NT
roberto> Kernel boost the speed with async calls (i get typical 50% speedup than not
roberto> using IoCompletionPorts). You can set the number of the simultaneous thread
roberto> that can be processed by the kernel basing to the number of cpu found
roberto> (tipical setting is 4 thread for CPU).
Currently we are using one thread / connection; The thread that is
handling the query is doing all read/writes on it's own file descriptors.
How would what you suggest be better than this ?
roberto> 4) if you need to send large streams with high efficiency (i'm referring to
roberto> blob fields) use the Write(s) API with overlapped structure (the send is
roberto> commited by kernel and not by win32 user space: it's fastest and with a
roberto> single win32 thread you can send hundreds of streams without problems or
roberto> "slowdowns")
Currently each thread is handling it's own send through write.
I don't know if this is better or not.
At least there is less communication overhead, compared to having a
dedicated thread that handles sending all the data
roberto> 5) i don't know the internal structure of mysql, but if isn't found you can
roberto> build a pooled tcp access to the server sql, so a query don't have to open a
roberto> tcp/connections, do the calls, close tcp/connections, but get an already
roberto> open and ready to accept-commands tcp/mysql/connection.
Do you have any examples of how to do this?
roberto> Thank'you and sorry for my horrible english syntax :-(
I didn't have any problems with your english :)
Thanks!
Regards,
Monty
--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius <monty@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com