On Tuesday 08 February 2005 11:52, Anders Saaby wrote:
> On Tuesday 08 February 2005 05:34, Dave Chinner wrote:
> > On Tue, Feb 08, 2005 at 01:37:16AM +0100, Anders Saaby wrote:
>
> I just tried:
>
> mount -o ihashsize=65536,logdev=/dev/sdc1
>
> Systime went from ~90% to ~5% !! :-)
>
...
> I couldn't really find out what hashsize was default before, so 64K was
> just a (good?) guess. As I can not see any large increase in memory usage
> maybe default values should be changed?
>
Extra note:
As one of my colleagues pointed out, prime numbers are usually better for
hashtable sizes, so I just tried ihashsize=64433 (prime number).
This resulted in ~20% less systime and the following kernel profiles looks
like prime numbers definetly _is_ a good idea:
- Look at the xfs_iget_core tick change.
<hashsize=65536>
# cat with_65k_ihash_tables_all_good.profile | sort -nr | head -20
94726 total 0,0368
69223 mwait_idle 480,7153
2636 tg3_rx 2,3877
1782 xfs_iget_core 1,4279
1555 *unknown*
1460 tg3_interrupt 4,3452
1429 tg3_start_xmit 0,9207
958 __do_softirq 4,9896
676 uhci_irq 1,2803
647 finish_task_switch 5,7768
470 handle_IRQ_event 4,1964
461 memcpy 2,6193
461 find_inode_fast 3,6016
447 local_bh_enable 2,7938
414 permission 3,2344
372 __wake_up 11,6250
369 sk_run_filter 0,3494
365 __kmalloc 2,5347
323 svc_recv 0,2347
269 s_show 0,5254
</hashsize=65536>
<hashsize=64433>
# cat with_65k_ihash_tables_all_good_prime.profile | sort -nr | head -20
95470 total 0,0371
69693 mwait_idle 483,9792
2847 tg3_rx 2,5788
1664 *unknown*
1576 tg3_start_xmit 1,0155
1479 tg3_interrupt 4,4018
929 __do_softirq 4,8385
768 finish_task_switch 6,8571
741 uhci_irq 1,4034
552 handle_IRQ_event 4,9286
526 find_inode_fast 4,1094
472 local_bh_enable 2,9500
468 memcpy 2,6591
419 __wake_up 13,0938
412 permission 3,2188
411 xfs_iget_core 0,3293
391 sk_run_filter 0,3703
373 __kmalloc 2,5903
359 svc_recv 0,2609
280 __mod_timer 1,7500
</hashsize=64433>
This is actually reproducable. :)
- Might be interesting for default values?
--
Med venlig hilsen - Best regards - Meilleures salutations
Anders Saaby
Systems Engineer
------------------------------------------------
Cohaesio A/S - Maglebjergvej 5D - DK-2800 Lyngby
Phone: +45 45 880 888 - Fax: +45 45 880 777
Mail: as@xxxxxxxxxxxx - http://www.cohaesio.com
------------------------------------------------
|