List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 8 1999 8:29am
Subject:Where is the time spent? (Linux Redhat 6)
View as plain text  
>>>>> "Erik" == Erik Liljencrantz <erik@stripped> writes:

Erik> Hello, I'm running a heavy and long indexing routine (C API and mySQL
Erik> 3.22.24) and after a minute or two more and more time is reported as idle
Erik> (using top and xosview). What is the machine doing?

Erik> Using "mysqladmin proc" I see update-queries that takes several seconds to
Erik> complete (just one thread). The table contains a unique id (int), a count
Erik> value (int) and a longblob field that is growing and growing (contains a
Erik> vector of binary int-values, 4 byte each).

Erik> After about 12 hours my application has consumed only 10 minutes CPU time
Erik> and the mySQL thread 23 minutes (about 5% of available time). Load average
Erik> says 1.60 and no other tasks are running.

Erik> Other tasks start very slow, but disk I/O as reported by xosview is only
Erik> ~150 kb/sec.

Erik> Maybe this isn't a bug at all (neither in mySQL nor Linux, perhaps in
Erik> top/xosview) but I'm wondering where the time is really spent and what
Erik> could possibly be done about it.

Erik> Additional details:
Erik>   Dell PowerEdge 1300 2xPIII 450 MHz, 192 MB RAM
Erik>   9 GB IBM SCSI disc, Adaptec AIC 7980 controller
Erik>   Redhat Linux 6.0, tried both kernel 2.2.5-15smp and 2.2.5-15
Erik>   mySQL 3.22.23b binary, same result with freshly compiled mySQL 3.22.24

Erik> Should I compile mysql --with-debug and look at the output...? Does it
Erik> include timing info?

Erik> Regards,
Erik>   Erik L.


If you just append values to a blob, you will get MUCH disk seeks as
you will get one extra fragment in the data file for each update!

If you want to do things like the above, you should definitely try
MySQL 3.23 instead!

Another option is to pre-allocated data in the blob and re-allocate
this in big pieces.

Where is the time spent? (Linux Redhat 6)Erik Liljencrantz8 Jul
  • Where is the time spent? (Linux Redhat 6)Michael Widenius8 Jul
    • Re: Where is the time spent? (Linux Redhat 6)Erik Liljencrantz8 Jul
      • Re: Where is the time spent? (Linux Redhat 6)Michael Widenius29 Jul
  • Re: Where is the time spent? (Linux Redhat 6)T├Ánu Samuel8 Jul