-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Biping MENG wrote: <snip> > >> Thank you for your guide. When I got to know drizzle I didn't make it very >> clear from MySQL. I spent some days on setting up the drizzle project >> developing environment. I was suffering from a very low downloading-rate >> (less than 1KB/s) when trying to get a local Bazaar repository. It takes >> almost one whole day to finish the downloading.
Yikes! Sorry to hear that! :( > I haven't tested the code, as it's just proof-of-concept stuff, but I > figured it might give you some ideas... > > Here is the interface file, > plugin/scoreboard_scheduler/scoreboard_scheduler.h: > > http://rafb.net/p/fKOGtt20.html > > And here is a prototype implementation file, > plugin/scoreboard_scheduler/scoreboard_scheduler.cc: > > http://rafb.net/p/pGJvKw89.html > > Hopefully, the code in the above might give you some more ideas. :) > > >> I'm sorry, but I was not working on my own working station the day I >> received the mail and only took a very brief look at the codes without >> copying them out. May I ask for another copy of these codes please? Sure thing. It was my fault to put them up on the pastebin for such a short period of time... Here you go: http://rafb.net/p/l3UjTk37.html http://rafb.net/p/cFeodD48.html >> I think Drizzle pool of threads scheduling plugin is a much better >> implementation over that of MySQL 5.1 as we treat sessions that need for >> processing and that wait for I/O differently. And each process procedure may >> be assigned to any one of the threads in the pool. This process-level >> scheduling bypassed the higher logic-layer and divide the session life-cycle >> into pieces of small procedures by network I/Os. It's a very nice way of >> doing that. Well, it's a good concept but a bad implementation. The performance of it compared to multi-thread is miserable. >> On the GSoC wiki >> page<http://drizzle.org/wiki/Soc#Pool_of_Threads_Scheduler>it writes >> "it >> can have very poor performance on other workloads". I wonder if the details >> on the investigation that shows poor performance of this scheduling are >> available eg. in what condition "poor" performance is more likely to show >> up. Pretty much all conditions that I have tested. :) >> By the way, is exception handling mechanism recommended in Drizzle? I found >> very few code that throws exceptions in our project. And this is not >> mentioned on the code style wiki page. It's a sore point in the code right now, but after the MySQL conference in a couple weeks, I'll be presenting a new way of handling errors which should make plugin developers' lives much easier, so hold off on that question for a little while... >> I am sorry that I made some mistakes on the "brief list of deliverables" >> part in my proposal on GSoC website. And even sorry that I've missed the >> deadline to fix it for some reason:( No worries, we can fix it any time after your proposal gets accepts (it will) >> I have posted the fixed part to the comment and is sending to the drizzle >> discussing group here: > >> Brief list of deliverables >> 1st April - 22nd April: Get ready for contribution. Review drizzle source >> code. Try to collect possiable ways of solutions to the idea. >> 23rd April - 22nd May: Keep in touch with my mentor and discuss on the >> practicability on each possiable solution. Try to find the best and refine >> it. >> 23rd May - 1st August: Test-driven coding. Discuss with my mentor to >> overcome the unexpected troubles. >> 2nd August - 24th August: Improve comments and documents. Fix remaining >> little bugs. Sounds good. I'll work with you after the proposal is officially accepted (this week probably) In the meantime, find us on IRC, since we're always around, and also keep up to date with the changes going on in any tree that Eric is working in, since his work will affect yours. Go here: https://code.launchpad.net/drizzle And look for the branches beginning with ~eday :) You can subscribe to his branches by clicking on them, and on the right, you'll see a link to subscribe to changesets via email. That's an easy way to keep informed about someone's work... Cheers! jay >> Best regards. > >> Biping MENG > >> Department of Computer Science and Technology >> Nanjing University > > > Cheers! > > Jay > >>>> Prioritizing can be implemented in either of the following ways: >>>> 1. Set some the request queue as prioritized queues. Only > prioritized >>>> requests are pushed into them. Workers should always try to fetch a > request >>>> from a prioritized queue first. And from non-prioritized queues only when >>>> prioritized queue is empty. >>>> 2. Depart workers into two group: one for prioritized requests, the >>>> other for all requests. Workers of prioritized group should only process >>>> requests and do nothing about non-prioritized requests. >>>> >>>> Workers are threads that are initialized on the start of mysql > server >>>> and will never be killed until the server is killed. They work in a way > like >>>> this: >>>> >>>> uint8_t responseBuffer[BUFFER_LEN]; >>>> while(true) >>>> { >>>> if(reqestQueue.empty()) >>>> { >>>> pthread_wait_cond on request-entered signals; >>>> } >>>> request* pRequest = requestQueue.Dequeue(); > if(pRequest == NULL) >>>> { >>>> continue; >>>> } >>>> if(!validateContext(pRequest->client_context)) >>>> { >>>> continue; >>>> } >>>> >>>> >>>> /* parsing sql statment, access db ...*/ >>>> PROCESS_REQUEST(pRequest, responseBuffer, BUFFER_LEN); >>>> >>>> sendResponse(pRequest->client_context->client_socket, responseBuffer, >>>> BUFFER_LEN); >>>> } >>>> >>>> Interrupting seems very easy in this model. We simply discard the >>>> request! >>>> >>>> Workers and client are separated by queues. Each request is > assigned >>>> to a worker separately. So re-scheduling is done on every request. >>>> >>>> Surly, we need to maintain some context info for each >>>> connection/session. When workers decide to close a session, they simply >>>> unregister the socket from epoll, close the socket and destroy the > related >>>> context. There may be still some requests already in the queue started by >>>> this closing session. Don't worry. They will be discarded at the call of >>>> validateContext(pRequest->client_context). >>>> >>>> >>>> How do you think of this way of scheduling? >>>> >>>> On Mon, Mar 30, 2009 at 8:47 PM, Jay Pipes <[email protected]> wrote: >>>> >>>> Biping MENG wrote: >>>>>>> Hello Sir,My name is Biping MENG. I am a Chinese student from > Department >>>> of >>>>>>> Computer Science and Technology, Nanjing University. I am very > interested >>>> in >>>>>>> refining thread scheduling strategy of MySQL listed in the idea page > and >>>>>>> have a strong desire to contribute to MySQL open source projects by >>>>>>> participating GSoC this summer. >>>>>>> I've already submitted the proposal on the GSoC official website. Hope >>>> the >>>>>>> mentor of this project to take a look at my proposal and give some >>>>>>> suggestions on it. >>>>>>> >>>>>>> I've posted this mail to mysql GSoC discussing group and got no reply. > So >>>> I >>>>>>> turned to this mail list and kindly request for reply from the mentor > of >>>>>>> this project. >>>> Hi Meng! As we discussed on IRC, there are a number of students >>>> interested in the session scheduling functionality. Like I mentioned on >>>> IRC, it would be cool if all interested students could work as a team on >>>> this, to make it easier for mentors to handle the proposal and also to >>>> make it more likely that many different ideas around the scheduler are >>>> examined. >>>> >>>> You had mentioned online that you'd be interested in working on a team >>>> of students. >>>> >>>> Other students: please respond here if you're interested in working with >>>> Meng on this project! :) >>>> >>>> Cheers! >>>> >>>> -jay >>>> >>>>>>> Best regards. >>>>>>> >>>>>>> Biping MENG >>>>>>> Department of Computer Science and Technology >>>>>>> Nanjing University >>>>>>> >>>>>>> >>>>>>> >>>>>>> > ------------------------------------------------------------------------ >>>>>>> _______________________________________________ >>>>>>> Mailing list: >>>>>>> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss> >>>>>>> Post to : [email protected] >>>>>>> Unsubscribe : >>>>>>> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss> >>>>>>> More help : https://help.launchpad.net/ListHelp >>>> ------------------------------------------------------------------------ > >>>> ------------------------------------------------------------------------ > >> > -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknbZbsACgkQ2upbWsB4UtEC5QCeND2pEKkX4uvrDyz1U7IQh1ZD jmYAnjOLNRhgOA3VgMnH97Jhsasv72AF =ixNj -----END PGP SIGNATURE----- _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

