[OFBiz] Users - optimizing
Si Chen
schen at graciousstyle.com
Sat Jul 17 07:44:55 EDT 2004
Hi David,
I tried this today. It works really well--response times down to 1
second on some big pages. It seems a bit uneven--the first hit took 34
seconds, with setting up the session and everything, and then it went
down from there. Is this normal with caching?
Thanks for your help,
Si
David Jones wrote:
>
> Even better, just put a "#" at the beginning of the line to comment
> it out.
>
> -David
>
>
> On Jul 14, 2004, at 12:56 PM, Si Chen wrote:
>
>> David,
>>
>> Great. I will try it this way. So I would set the cache to never
>> expire by leaving the space after "=" to empty right?
>>
>> Si
>>
>> David Jones wrote:
>>
>>>
>>> In most cases I wouldn't set time limits or size limits on caches.
>>> For things like scripts just leave it open so that they never
>>> expire. If necessary you can always manually clear the cache in
>>> webtools, but in many cases that isn't necessary because major
>>> code changes are often accompanied by a server restart anyway.
>>> Note that having a size limit or time limit on a cache reduces
>>> it's performance somewhat.
>>>
>>> Right because of the way JPublish works the compiled scripts are
>>> cached, but the source for the scripts may be reloaded by
>>> BSF/JPublish before it gets to our code. This will change in the
>>> Screen Widget since it will use a much more direct architecture
>>> for special cases.
>>>
>>> For scripts, configuration and such, I'd say don't worry about
>>> memory. For things like the Entity Engine caches, we just set them
>>> to use soft references by default so that the VM can recover
>>> memory when needed.
>>>
>>> -David
>>>
>>>
>>> On Jul 14, 2004, at 10:45 AM, Si Chen wrote:
>>>
>>>> Hi David,
>>>>
>>>> Thanks for your help on this. What would you recommend as the
>>>> optimal time to cache scripts and simple methods? Since they
>>>> change pretty infrequently, it would seem that they should be
>>>> cached for a long time (days or weeks at a time)? Would you
>>>> recommend this?
>>>>
>>>> Also, are event="bsf" BSH scripts from the controller also
>>>> cached? (I think so, right?)
>>>>
>>>> Last of all, how would you recommend setting the total cache size
>>>> against the virtual machine's maximum memory, or does this matter?
>>>>
>>>> Thanks a lot!
>>>>
>>>> Si
>>>>
>>>> David Jones wrote:
>>>>
>>>>>
>>>>> Si,
>>>>>
>>>>> Something I forgot to mention because I am so used to it as a
>>>>> standard practice:
>>>>>
>>>>> 1. comment out the settings in cache.properties that effectively
>>>>> disable the FTL, BSH and other caches by setting their timeouts
>>>>> to 1ms (this is great for development, but wreaks havoc on a
>>>>> production server)
>>>>> 2. in the debug.properties file turn off everything below the
>>>>> "important" level
>>>>>
>>>>> That should speed things up quite a bit... First hits on certain
>>>>> things will still be a bit slower, but you'll se a HUGE overall
>>>>> difference.
>>>>>
>>>>> -David
>>>>>
>>>>>
>>>>> On Jul 13, 2004, at 2:52 AM, David Jones wrote:
>>>>>
>>>>>>
>>>>>> Si,
>>>>>>
>>>>>> If the performance is not adequate for those pages the first
>>>>>> thing to do is find out why. One thing that can be valuable is
>>>>>> to add or turn on some logging to see how many database queries
>>>>>> are getting past the entity cache. Preferably you will only
>>>>>> have a couple of database hits per page request. If you have
>>>>>> more than that you can run into trouble pretty quick.
>>>>>>
>>>>>> Keep in mind that by default OFBiz comes with a LOT of junk
>>>>>> turned on and a LOT of little boxes with things loading and I
>>>>>> must admit that not all of these have been cache-optimized,
>>>>>> especially not with the new cache advances contributed by Adam
>>>>>> Heath just recently. A lot of these can effectively be turned off.
>>>>>>
>>>>>> I saw BJ's response, and he is right to mention DB stuff since
>>>>>> it is often the biggest performance problem. However, there
>>>>>> are other things to look at and in general with high volume
>>>>>> sites we recommend avoiding database hits as much as possible
>>>>>> through caching and such.
>>>>>>
>>>>>> Sometime in the near future we may spend some time doing
>>>>>> another optimization pass to try to find such inefficiencies,
>>>>>> but right now there are bigger things on the to do list, and
>>>>>> some of them like the screen widget should actually result in a
>>>>>> performance increase.
>>>>>>
>>>>>> -David
>>>>>>
>>>>>>
>>>>>> On Jul 12, 2004, at 6:52 PM, Si Chen wrote:
>>>>>>
>>>>>>> Hello. Does anyone have any general suggestions for optimizing
>>>>>>> run time performance (of ecommerce product/category pages)?
>>>>>>> Thanks, Si Chen
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------
>>>>>>> -- -
>>>>>>> To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
>>>>>>> For additional commands, e-mail: users-help at ofbiz.dev.java.net
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
>>>> For additional commands, e-mail: users-help at ofbiz.dev.java.net
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
>> For additional commands, e-mail: users-help at ofbiz.dev.java.net
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
For additional commands, e-mail: users-help at ofbiz.dev.java.net
More information about the Users
mailing list