Skip to content

Tech tip of the day: look out for the (very) large files

Problem: your Linux system should be running nice and fast. Are there are strange slowdowns you can’t work out? Or are you seeing the odd, suspicious and occasional IO wait?

One quick check: take a brief look for large files on your system (e.g. via this tip on StackOverflow), and at those in use (e.g. via lsof).

Just by way of example, earlier on today I was taking a look at a server that’d had quite a few problems overnight. Whilst everything looked OK-ish now, the load average was higher than expected, and anything touching the file system was sluggish.

The cause? A rogue MySQL slow query log, that during the overnight troubles had swelled to over 19GB! Fixed that pretty promptly and life is now good again :-)

One quick tip to remember: if you see a log file, have a think about adding it to logrotate. It might not fix all problems, but it’s a very good solution to managing constantly expanding log files.

Written by Tom

Are you looking for web development or just someone who will work with your business needs and not against them? Get in touch with me here, or take a look at my consultancy’s website: Moo Unlimited. I’m confident I can help you.

Published inTips

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *