All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [SUGGESSTION 1/1] OCFS2: automatic dlm hash table size
@ 2009-06-08  5:14 wengang wang
  2009-06-08  5:55 ` Tao Ma
  0 siblings, 1 reply; 7+ messages in thread
From: wengang wang @ 2009-06-08  5:14 UTC (permalink / raw)
  To: ocfs2-devel

backgroud:
	ocfs2 dlm uses a hash table to store dlm_lock_resource objects. the often used lookup is performed on the hash table.

problem:
	for usages that there are huge number of inodes(thus huge number of dlm_lock_resource objects) in a ocfs2 volume, the lookup performance becomes a problem. the lookup holds spin_lock which could put all others cpus into the state of aquring the spinlock. if the lock is held long enough by the lookup process, some hardware watchdog  could reboot box since it's not fed in a time(the fed has no change to be scheduled).

	enlarging the hash table is the way to speed up the lookup. but we don't know how large is a good size. --too small, performance is bad; too large, there is a memory waste.

suggestion:
	so I suggest a automatic resizing the dlm_lock_resource hash table feature. that means it can increase the size of the hash table per the number of dlm_lock_resource objects which are already in the hash table.
	the default(smallest) size is 16 in shift bits. when the number of dlm_lock_resource rearches 250,0000, auto-resizing is triggered and the destination size is 17. and when rearches 500,0000, resize to 18, for 1000,0000, resize to 19... though the numbers need to be discussed yet.
	with this we can use proper sized memory for runtime usage and keep good enough lookup performance.

if it's good, I'm glad to do it.

thanks,
wengang.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-06-09  4:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08  5:14 [Ocfs2-devel] [SUGGESSTION 1/1] OCFS2: automatic dlm hash table size wengang wang
2009-06-08  5:55 ` Tao Ma
2009-06-08  6:24   ` Wengang Wang
2009-06-08  6:40     ` Tao Ma
2009-06-08  6:49       ` Wengang Wang
2009-06-08 19:07         ` Sunil Mushran
2009-06-09  4:20           ` Wengang Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.