From: Brian Le Roy Date: 2005-09-09T01:02:19+09:00 Subject: Re: general performance question I am doing some database queries using the MySQL-Ruby library, not DBI. I disabled logging, so it's not IO. Are there any differences between MySQL-Ruby and DBI? Robert Klemme wrote: > Brian Le Roy wrote: > >>I'm running top and when I run my app - I see the user CPU >>utilitization hit ~70%, but the ruby process only shows about 3%. Is >>this observation indicative of inefficient code? > > > Hm, might be that the rest of the 70% are spent in the kernel (doing IO > probably). Do you do a lot IO? Or do you start another process (or > multiple processes) from your Ruby script? Did you have an eye on your > disk LED? I'm not too familiar with top but I think I remember that it > sometimes spits out odd values - might be another explanation. > > >> And to be complete, >>the user CPU utilization drops to 0% when I stop the app - so it's me. > > > Guilty!!! :-) > > Kind regards > > robert > > >