5 ms·
I tried caching the hell out of Rails, kept adding indexes to my SQL tables, created 4 MySQL replicas, added more RAM to my linodes, tuned many default paramete
by ngsayjoe 15y ago
I tried caching the hell out of Rails, kept adding indexes to my SQL tables, created 4 MySQL replicas, added more RAM to my linodes, tuned many default parameters in my.cnf, but the website was still slow to a crawl.
This parameter saved it all "innodb_buffer_pool_size = 768M" ... how am I supposed to know that Rails creates InnoDB by default, i thought MySQL default was always MyISAM.
- jswinghammer 15y agoThis is changing because MyISAM is not really a true database (in the ACID compliant sense of the term). I guess I would have assumed they were MyISAM too but they don't perform differently enough at low usage levels that you would notice it right? How big was this was application?
- ngsayjoe 15y agoAbout 5 million pageviews / month. The website is quite processing intensive.
- ceejayoz 15y agoThat's only two pageviews a second, on average.
- jswinghammer 15y agoWe can agree that traffic rarely comes in at an average rate.
- moe 15y agoAssuming the standard bell curve it's six pageviews a second, at peak.
- ceejayoz 15y agoMySQL's default may be MyISAM, but it's a bad default. It is a good thing that Rails uses InnoDB by default.
- ngsayjoe 15y agoI think MySQL 5.5 onwards the default would be InnoDB.
- wolf550e 15y agoDumping the schema from the database itself will reveal the table type. Knowing the physical organization of the schema is required for optimization work. If you only used the logical organization information (UML diagram for example) you were doing it wrong. In real RDBMS systems, tables can be clustered (index organized in Oracle-speak) or not, nested or not, in different tablespaces, with many different parameters that do not change the semantic of DML/queries but change the performance significantly.
- ngsayjoe 15y agoYes i know, but it just never cross my mind that my tables have been InnoDB all these while ... among all the optimization, this is one i overlook, well i'm not a DBA afterall.