Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Possible command to boost to laptop performance
- Date: Thu, 18 Nov 2010 13:44:29 +0900
- From: Darren Cook <darren@example.com>
- Subject: Re: [tlug] Possible command to boost to laptop performance
- References: <4CCF948D.6020707@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10
Dave wrote: > Recently, I came across this simple command which seems to help. > Actually, it helps a heck of a lot, though it does raise questions. > sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches" Thanks for this tip and the discussion that followed; it was educational. I've been trying to track down why a database import process was so much slower on an ubuntu 10.04 machine than a ubuntu 8.04 machine. Both software RAID, 4 cores, plenty of memory, etc. I found a couple of speedups, and as the first is general I thought it would be of interest. Here is the sound bite: ext4 writes much slower than ext3. Eh, you cry? It didn't say that on the packet?! What changed is (in the default configuration) ext4 is safer than ext3, but the trade-off is that writes are slower. If you were happy with the peace-of-mind-level of ext3 (I was), then you can get that by switching off "barrier" (see [1][2]). Intial DB import speed (this was an immediate rerun, so maximum benefit of caching): 3m 42s I then added barrier=0 to my /etc/fstab. Straight after a reboot it improved to: 1m 57s A re-run (a few days later, so maybe a little help from cache): 1m 27s I then tried a few mysql improvements, and it went down to 1m 6s (1m 30s after a reboot). Not great, but not to be sniffed at. While typing this up I noticed I didn't have noatime on that partition. So I added that, another reboot, but (as expected, because noatime makes reads quicker, not writes) no improvement: 1m 38s (1m 10s when run again). So, for this particular application: * getting rid of barrier: 200-250% speed-up * mysql tweaking: 30-40% speed-up Darren [1]: http://lwn.net/Articles/283161/ [2]: http://ubuntuforums.org/showthread.php?t=1313834 [3]: Added these to /etc/mysql/my.cnf: innodb_buffer_pool_size = 256M innodb_additional_mem_pool_size = 32M innodb_log_file_size = 64M innodb_log_buffer_size = 8M (When changing log_file_size you have to stop mysql, go to /var/lib/mysql/ and delete the two ib_logfile files, then start mysql.) -- Darren Cook, Software Researcher/Developer http://dcook.org/gobet/ (Shodan Go Bet - who will win?) http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles)
- References:
- [tlug] Possible command to boost to laptop performance
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: [tlug] -reminder- nomikai tomorrow
- Next by Date: [tlug] Looking for a used notebook PC
- Previous by thread: Re: [tlug] Possible command to boost to laptop performance
- Next by thread: Re: [tlug] Possible command to boost to laptop performance
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links