From: Vlad S. <vl...@cr...> - 2006-08-23 14:16:18
|
Looking thru the code i see that mostly only fastpath and log uses NsConfig reads in real time, all others are copy values into local structures. funny, but these who uses config are performance critical and will introduce lock contention because thet are figthing for the same config values. Another raw/uncooked idea: is it possible to keep changed values separately, no lock default config as is now and whoever changed value just keep it in the lock-guarded hash. If i care about locking and changed value i will check new hash for new value, others who does not may still use read-only config list. Zoran Vasiljevic wrote: > On 23.08.2006, at 13:01, Zoran Vasiljevic wrote: > >> Alternatively, the DOM tree can be replaced by a combination >> of hash-tables and C-structures. Each ns_section will >> effectively be a hash table of parameters with a parameter >> being a simple C-struct. Also, there will be one global hashtable >> needed to resolve ns_section names to hash-tables holding parameters. >> I doubt however that this would be any faster then a good DOM >> implementation. > > > I see... this is more-less the nsv as we have it today. > > Why wouldn't we making nsv interface > public and use it for configuration store? > After all, the code is there and is well > tested. We might need to tweak some pieces > but, in principle, this is it. > > I would need to refresh my view of nsv locking > but generally it uses fixed number of buckets > to avoid everybody locking the same global mutex. > Increasing number of buckets lowers the contention. > > The only part we need to think about is actual > parameter storage as this will not be a plain > value, but also some housekeeping info like type, > ranges etc, in addition. > > Given relatively fast lookup and relatively cheap > locking, we would not need to have private and shared > copies. I believe just one shared copy would be > perfectly OK. > > Hm? What do you mean? > > Cheors > Zoran > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |