The one engine per user per session has been fixed, and now we use one engine per thread. This helped performance a lot. However now it looks like we need a bit more.
I believe our ruleset can be modified to use one engine overall using some sort of session identifier on the facts, however my worry is that would create one big bottleneck. Does this offer any performance gains besides only needing to parse and construct the network once? I dont think creating the network once per thread is causing us many performance problems. I am trying to establish if this change is worth persuing or if there are other areas of the rules that could use attention. Thanks again, ryan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 7:23 AM To: [EMAIL PROTECTED] Subject: Re: JESS: jess performance I think Ryan Crumley wrote: > <P><FONT SIZE=2 FACE="Arial">I am using jess from a web environment where many jess > engines (1 per user, current load testing involves 100 users) are in operation at a > time. Each time a jess engine is created my .clp files are parsed and loaded. Is it > possible to somehow cache the parsed clp file so each engine doesn't need to reparse > it? At the very least it would be possible to pool available jess engines that > already have loaded and parsed the config files. Has anyone tried this before and > seen good results? </FONT></P> > Here's where the problem lies. The one-engine/one-user architecture is inherently inefficient. The simplest change that would improve things would be to still use one engine per user, but as you suggest, cache the engines with the rules loaded. A "(reset)" before each user would be much cheaper than recompiling the Rete network. An even better architecture, but one which requires more changes, is to use one engine (or a small number of engines) for all users, simultaneously. If all of your user-specific facts include a user-specific "tag" -- i.e., a slot containing a user-id of some kind -- then one engine can reason about multiple users simultaneously. "Jess in Action" will be out -really soon- and contains three chapters devoted to a web application that does this. --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] -------------------------------------------------------------------- -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
