I’m still alive – preparing my presentation for ConFoo conference (about massive scalability), writing an article on load balancer in the free software domain, doing a technical review of a book on Nginx (it should be pretty good), and driving my company at crazy speed (some new contracts and operations for existing ones). Ho, and I’m preparing a wedding (mine) – yeah, I’m alive and living my life at the fullest.
In the midst of all that, I’ve got a mandate involving MySQL databases and the import of a big chunk of data (about 8gb raw). Yeah, I know, some peoples reading my blog will know whom I speaking of. The data come with the schema, the load data queries and the CSV files. Should be pretty easy, long, but easy.
Got that one wrong. I’ve been bitten by all the bugs that were on the road:
– MySQL LoadData (from CSV) use the TMPDIR variable (which was on root filesystem) and LoadData generate a temporary queries in that directory. In the present case, the 8GB raw csv represented over 40GB of required tmpdir space.
– MySQL Replication doesn’t live really well with importing large amount of data. The first (failed) import broke all the replication (ring of masters + slaves).
– and…
MySQL’s innodb log file cannot shrink its size. That’s pretty simple as a rule, but it creates lots of problems when you have a failed import due to free space issue. Whatever you do, MySQL will NOT give back this hard drive space unless you dump all and re-import. The current case being a database of over 20GB, it’s really a no-go (and since you are lacking free space, dump is a no-go).
The important things to take away from that encounter is: always enable innodb_file_per_table on MySQL. The performance overhead will be minimal (very) – you might even get better performance depending on your file system tolerance for fragmentation – AND – you will be able to drop table and regain the disk space… even if its only for a couple hours. The drop of a 10GB database should always give you some free space ;-). Question is: why haven’t MySQL put this setting as default ? Its been around for long enough… is stable and does help the general user (a sysadmin) experience.
I just put the link of your blog on my Facebook Wall. very nice blog indeed.:..’-
I notice that there’s no where on your site, to where others can subscribe to your updated posts.can u comment back, letting myself, as well as other know where to subscribe exactly
I will invite all my friends to your blog, you really got a great blog.::`-’
http://www.thoughts.com/cheapcigarettesonlinesite/cheap-cigarettes-online-cheaper-than-regular-cigarettes cheap cigarettes online
I was also reading a topic like this one from another site.`-~~”
We prefer to claim i uncovered your blog rather usefull, that improved me fully understand this issue in front of you really. I would prefer to recognise if i can be able to write articles for ones web log.
http://www.thoughts.com/discountcigarettesite/discount-cigarettes-save-money-with-scentless-electric-cigarettes discount cigarettes
A blog like yours should be earning much money from adsense.*..*,
I was also reading a topic like this one from another site.,;~,,
Hi, do you have a facebook fan page for your blog?’”,”~
I’ve go through some of the web sites on the website considering that yesterday, and I genuinely like your design of running a blog. I book-marked this in order to my top features internet site listing and you will be checking rear soon. Go to my personal web site in addition along with make me aware your viewpoint.
http://www.thoughts.com/searchpeopleonline/search-people-find-anyone-today-easily search people
I think your blog is getting more and more visitors.–`.”
I would really like you to become a guest poster on my blog.”;;,`
Have you tried twitterfeed on your blog, i think it would be cool.:-~`;
I see that you are using WordPress on your blog, wordpress is the best..”~*,
I think your blog is getting more and more visitors..’;**
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
Great artical, I unfortunately had some problems printing this artcle out, The print formating looks a little screwed over, something you might want to look into.
I would really love to guest post on your blog.’*:”;
A blog like yours should be earning much money from adsense.”`,,.
nice one for sharing this with all of us. Of course, what a great site and informative posts, I will bookmark this site. keep doing your great job and always gain my support. cheers for sharing this beautiful article
Your blog never ceases to amaze me, it is very well written and organized.~;-;”
you are in reality a just right webmaster. The web site loading pace is incredible. It kind of feels that you are doing any distinctive trick. Also, The contents are masterpiece. you have performed a magnificent task in this topic!
This page iswhere I got the most useful information for my information gathering. cheers for posting, maybe we can see more on this. Are you aware of any other websites on this subject?
I always visit your blog everyday to read new topics.:~*:,
I have to say i am very impressed with the way you efficiently blog and your posts are so informative. You have really have managed to catch the attention of many it seems, keep it up!