List:General Discussion« Previous MessageNext Message »
From:Dan Trainor Date:May 24 2006 11:41pm
Subject:Re: mysql performance
View as plain text  
Moritz Möller wrote:
> Hi list,
> 
> we're running some large high-traffic mysql servers, and are currently
> reaching the limit of our machines.
> 
> We're using mysql 4.1 / innodb on debian, ibdata is about 35GB. Hardware is
> quad xeon dualcore, 8 GB RAM. Disk-io is nearly zero, limiting factor is
> CPU.
> The queries run very fast (I seldom see a process that's running longer than
> a second), but there are too many of them, I guess.
> 
> As far as I know, NDB keeps the whole database in memory, so with indices
> and some mem as reserve, we'd need ~48GB (3x16 or something) in total for
> NDB :(
> 
> Does someone know other solutions to this? Is NDB the only storage engine
> supporting clustering?
> 
> Thanks in advantage,
> 
> Moritz
> 
> 
> 

Hi -

That's quite a large database.  I, too, have been dealing with what I 
thought was a large database for this new project.  Being 2G, it hardly 
compares to your database size.

Keep in mind, however, that a 36G ibdata file does not necessarily mean 
that you are using 36G to store data.  InnoDB documents from the MySQL 
site explain ways to compact these files, possibly shrinking the size of 
ibdata files.  Another way to get a better idea of how much data you're 
actually using is to use the 'SHOW TABLE STATUS' query from within 
MySQL.  Take the "InnoDB Free:" item under the 'Comment:' column, and 
subtract this from the total size of the ibdata file(s).  This will give 
you a more accurate representation of how much of that ibdata file 
you're actually using.  I think.  (Someone mind correcting me if I'm way 
off here?)

NDB may not be your solution.  Even though disk-based storage is 
included with NDB in 5.1 and beyond, I'm not too sure how this will 
affect the speed of your operations.  I suppose it's worth a try, however.

Please take this advise with a grain of salt, as InnoDB is still quite 
new to me, as well.  Other things I've found to speed up large databases 
are to properly make indexes, and testing them with the EXPLAIN 
function.  This alone has let me to speed up our operations as much as 
30% in most cases.

Thanks
-dant
Thread
mysql performanceMoritz Möller24 May
  • Re: mysql performanceDan Trainor25 May
    • RE: mysql performance / ndb 5.1 performanceMoritz Möller25 May
      • Re: mysql performance / ndb 5.1 performanceDan Trainor25 May
        • Re: mysql performance / ndb 5.1 performancesheeri kritzer25 May
      • Re: mysql performance / ndb 5.1 performanceJay Pipes25 May
        • RE: mysql performance / ndb 5.1 performanceMoritz Möller25 May