Re: Performance scale up Thread

2024-05-09 Thread Mandar K
Hi Jacques, greetings. We will check. Appreciate it.

On Thu, May 9, 2024 at 10:56 AM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> I suggest you use YourKit Java Profiler
>
> BTW, it's free for Apache committers
>
> https://svn.apache.org/repos/private/committers/donated-licenses/yourkit-java-profiler.txt
>
> HTH
>
> Jacques
>
> Le 08/05/2024 à 20:30, Mandar K a écrit :
> > Dear All, related to performance scale up thread wanted to share one
> > observation :
> >
> > Everytime there is an increase in memory it gets filled up. This may be
> due
> > to a memory management bug in any code. Some processes are creating a lot
> > of objects and not clearing afterwards.
> >
> > Requesting inputs on the below
> >
> > 1. How to identify those objects / code which is causing memory leak
> > 2. Any suggestions for GC
> >
> > We are facing a challenge on the performance issue. Any strong assistance
> > will really help.
> >
> > Thanks a lot.
> >
>


-- 
Regards
Mandar Kulkarni
Adaptability is the whole mystery of life - Swami Vivekanand


Re: Performance scale up Thread

2024-05-09 Thread Mandar K
Thanks Ingo, we will check. Appreciate it.

On Thu, May 9, 2024 at 3:16 PM Ingo Wolfmayr 
wrote:

> Did you check the caching settings.
>
> framework/base/config/cache.properties
>
> You should enable caching groovy scripts :
>
> # Development Mode - comment these out to better cache groovy scripts, etc
> #These are all cleared by default every 1 milliseconds, or ten seconds
> #minilang.SimpleMethodsDirect.expireTime=1
> #minilang.SimpleMethodsResource.expireTime=1
> #minilang.SimpleMethodsURL.expireTime=1
>
> I remember this causing a memory leak on production - it is meant for
> developing mode.
>
> Best regards,
> Ingo
>
> -Ursprüngliche Nachricht-
> Von: Mandar K 
> Gesendet: Mittwoch, 8. Mai 2024 20:31
> An: ofbizuser 
> Betreff: Performance scale up Thread
>
> Dear All, related to performance scale up thread wanted to share one
> observation :
>
> Everytime there is an increase in memory it gets filled up. This may be
> due to a memory management bug in any code. Some processes are creating a
> lot of objects and not clearing afterwards.
>
> Requesting inputs on the below
>
> 1. How to identify those objects / code which is causing memory leak 2.
> Any suggestions for GC
>
> We are facing a challenge on the performance issue. Any strong assistance
> will really help.
>
> Thanks a lot.
>
> --
> Regards
> Mandar K
>


-- 
Regards
Mandar Kulkarni
Adaptability is the whole mystery of life - Swami Vivekanand


Re: Performance scale up Thread

2024-05-08 Thread Jacques Le Roux

I suggest you use YourKit Java Profiler

BTW, it's free for Apache committers
https://svn.apache.org/repos/private/committers/donated-licenses/yourkit-java-profiler.txt

HTH

Jacques

Le 08/05/2024 à 20:30, Mandar K a écrit :

Dear All, related to performance scale up thread wanted to share one
observation :

Everytime there is an increase in memory it gets filled up. This may be due
to a memory management bug in any code. Some processes are creating a lot
of objects and not clearing afterwards.

Requesting inputs on the below

1. How to identify those objects / code which is causing memory leak
2. Any suggestions for GC

We are facing a challenge on the performance issue. Any strong assistance
will really help.

Thanks a lot.



Re: Performance issues

2024-04-25 Thread Mandar K
Thanks Ingo, we will go through the below pointers.

Appreciate it.


On Tue, Apr 23, 2024 at 11:24 AM Ingo Wolfmayr 
wrote:

> Hi Mk,
>
> I recommend checking the following points first:
>
> 1. Database Optimization:
> Indexes: Ensure that your database tables are properly indexed. Missing
> indexes can dramatically slow down query performance.
> Query Analysis: Use tools like slow query logs to identify inefficient
> queries and optimize them.
> Connection Pooling: Verify that your database connection settings are
> optimized for your usage pattern.
>
> For mysql/mariadb I use: https://github.com/major/MySQLTuner-perl for
> performance recommendations
>
> 2. Server and JVM Tuning:
> Memory Allocation: Increase the JVM heap size if necessary. This is
> especially important if you are experiencing OutOfMemoryErrors.
> Garbage Collection: Optimize garbage collection parameters to reduce
> overhead. Tools like VisualVM can help monitor garbage collection and tweak
> settings.
>
> 3. OFBiz Configuration:
> Thread Pools: Adjust the size of thread pools in OFBiz to match your
> server’s hardware capabilities.
> Service Engine: Review the service engine configuration for performance
> bottlenecks.
>
> Best regards
> Ingo
>
> -Ursprüngliche Nachricht-
> Von: Mandar K 
> Gesendet: Dienstag, 23. April 2024 06:51
> An: user@ofbiz.apache.org
> Betreff: Performance issues
>
> Hi All,
>
> In a recent switchover to Ofbiz we are observing performance issues where
> almost all the application is running very slow.
>
> Please give pointers which will give breakthrough.  Thanks for your
> inputs,  much appreciated.
>
>
> Regards
> Mk
>


-- 
Regards
Mandar Kulkarni
Adaptability is the whole mystery of life - Swami Vivekanand


Re: Performance issues

2024-04-25 Thread Mandar K
Thanks Pierre. Apologies for the delay in responding as I was travelling.
You guys keep the forum interactive !

Below are the details on infra :

16 Core logical
96GB RAM
1 TB HDD SSD
Linux

Share your thoughts.

 BR
Mandar

On Tue, Apr 23, 2024 at 12:08 PM Pierre Smits 
wrote:

> Hi Mandar (I trust this is your first name),
>
> Welcome back.
>
> Could you tell a bit more about your OFBiz implementation (which version,
> which RDBMS, whether running in cloud or on premise, what you use most in
> OFBiz).
>
> Such information will surely help pinpoint your issue
>
> Met vriendelijke groet,
>
> Pierre
>
>
> On Tue, Apr 23, 2024 at 6:53 AM Mandar K  wrote:
>
>> Hi All,
>>
>> In a recent switchover to Ofbiz we are observing performance issues where
>> almost all the application is running very slow.
>>
>> Please give pointers which will give breakthrough.  Thanks for your
>> inputs,  much appreciated.
>>
>>
>> Regards
>> Mk
>>
>

-- 
Regards
Mandar Kulkarni
Adaptability is the whole mystery of life - Swami Vivekanand


Re: performance

2017-03-21 Thread Scott Gray
Is there any indication it consumes anything other than some small amount
of RAM after startup?

Regards
Scott

On 19 March 2017 at 22:23, Pierre Smits  wrote:

> With respect to gradle that is not entirely true. As you use it to run
> OFBiz it will continue to consume hardware resources.
>
> Best regards,
>
> Pierre Smits
>
> ORRTIZ.COM 
> OFBiz based solutions & services
>
> OFBiz Extensions Marketplace
> http://oem.ofbizci.net/oci-2/
>
> On Sat, Mar 18, 2017 at 6:18 PM,  wrote:
>
> > ...
> > - don't use gradle to start up, but use java - jar ofbiz.jar - set
> > 'check-on-start' to false - set 'add-missing-on-start' to false - set
> > 'check-inidices-on-start' to false
> > ...
> >
> > I am curious if gradle and the others are just start up time issues...I
> am
> > assuming these have no effect after start up is complete?
>


Re: performance

2017-03-19 Thread Pierre Smits
With respect to gradle that is not entirely true. As you use it to run
OFBiz it will continue to consume hardware resources.

Best regards,

Pierre Smits

ORRTIZ.COM 
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Sat, Mar 18, 2017 at 6:18 PM,  wrote:

> ...
> - don't use gradle to start up, but use java - jar ofbiz.jar - set
> 'check-on-start' to false - set 'add-missing-on-start' to false - set
> 'check-inidices-on-start' to false
> ...
>
> I am curious if gradle and the others are just start up time issues...I am
> assuming these have no effect after start up is complete?


Re: performance

2017-03-18 Thread stimits
...
- don't use gradle to start up, but use java - jar ofbiz.jar - set 
'check-on-start' to false - set 'add-missing-on-start' to false - set 
'check-inidices-on-start' to false
...
 
I am curious if gradle and the others are just start up time issues...I am 
assuming these have no effect after start up is complete?

Re: performance

2017-03-18 Thread Pierre Smits
You could consider looking in the tools folder of your OFBiz instance.

Best regards,

Pierre Smits

ORRTIZ.COM 
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Sat, Mar 18, 2017 at 1:15 PM, Bahaa Alamood <
balam...@arcdigitalsolutionsandconsultancy.com> wrote:

> Hi Pierre,
>
> Thanks for the tips, I use centos 7  for this server, do you have a
> startup script for this or hints on how to create one?
>
>
> On 3/18/2017 4:44 AM, Pierre Smits wrote:
>
>> Hi Bahaaldin,
>>
>> Here are some (other) tips to optimize your production environment for
>> performance:
>>
>> - remove all components that you don't intend to use
>> - remove all 3rd party solution integrations that you don't use
>> (payment/shipment/etc)
>> - don't use gradle to start up, but use java - jar ofbiz.jar
>> - set 'check-on-start' to false
>> - set 'add-missing-on-start' to false
>> - set 'check-inidices-on-start' to false
>>
>> Best regards,
>>
>>
>> Pierre Smits
>>
>> ORRTIZ.COM 
>>
>> OFBiz based solutions & services
>>
>> OFBiz Extensions Marketplace
>> http://oem.ofbizci.net/oci-2/
>>
>> On Fri, Mar 17, 2017 at 1:10 PM, Bahaa Alamood <
>> balam...@arcdigitalsolutionsandconsultancy.com> wrote:
>>
>> Hello,
>>>
>>> I have an of biz installation and it is used daily for accounting and
>>> other things, however I am having to restart the server every week to
>>> keep
>>> the performance at an  acceptable speed. my environment is java 1.8 and
>>> the
>>> server has 4 GB RAM with 2 core processor. I have noticed that the
>>> performance decreases with time. I start the server with gradle and the
>>> background option.
>>>
>>> Any Ideas why this is happening?
>>>
>>>
>>> --
>>> Bahaaldin Al-amood
>>> IQ Tel: +964 (0) 780 926 2103
>>> US tel: 540 632 1388
>>> email: ba...@arcdsc.com
>>> Skype ID: bahaa.alamood
>>>
>>> Arc Digital Solutions and Consultancy
>>> www.arcdsc.com
>>>
>>> This message contains information that may be confidential
>>> and privileged to Arc digital Solutions and Consultancy, its partners, or
>>> customers.
>>> Unauthorized use is strictly prohibited. Unless you are the
>>> addressee (or authorized to receive mail for the addressee),
>>> you should not use, copy or disclose to anyone this message
>>> or any information contained in this message. If you have
>>> received this message in error, please so advise the sender
>>> by reply e-mail and delete this message. Thank you for your
>>> cooperation.
>>>
>>>
>>>
>


Re: performance

2017-03-18 Thread Bahaa Alamood

Hi Pierre,

Thanks for the tips, I use centos 7  for this server, do you have a 
startup script for this or hints on how to create one?



On 3/18/2017 4:44 AM, Pierre Smits wrote:

Hi Bahaaldin,

Here are some (other) tips to optimize your production environment for
performance:

- remove all components that you don't intend to use
- remove all 3rd party solution integrations that you don't use
(payment/shipment/etc)
- don't use gradle to start up, but use java - jar ofbiz.jar
- set 'check-on-start' to false
- set 'add-missing-on-start' to false
- set 'check-inidices-on-start' to false

Best regards,


Pierre Smits

ORRTIZ.COM 
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Fri, Mar 17, 2017 at 1:10 PM, Bahaa Alamood <
balam...@arcdigitalsolutionsandconsultancy.com> wrote:


Hello,

I have an of biz installation and it is used daily for accounting and
other things, however I am having to restart the server every week to keep
the performance at an  acceptable speed. my environment is java 1.8 and the
server has 4 GB RAM with 2 core processor. I have noticed that the
performance decreases with time. I start the server with gradle and the
background option.

Any Ideas why this is happening?


--
Bahaaldin Al-amood
IQ Tel: +964 (0) 780 926 2103
US tel: 540 632 1388
email: ba...@arcdsc.com
Skype ID: bahaa.alamood

Arc Digital Solutions and Consultancy
www.arcdsc.com

This message contains information that may be confidential
and privileged to Arc digital Solutions and Consultancy, its partners, or
customers.
Unauthorized use is strictly prohibited. Unless you are the
addressee (or authorized to receive mail for the addressee),
you should not use, copy or disclose to anyone this message
or any information contained in this message. If you have
received this message in error, please so advise the sender
by reply e-mail and delete this message. Thank you for your
cooperation.






Re: performance

2017-03-18 Thread Pierre Smits
Hi Bahaaldin,

Here are some (other) tips to optimize your production environment for
performance:

   - remove all components that you don't intend to use
   - remove all 3rd party solution integrations that you don't use
   (payment/shipment/etc)
   - don't use gradle to start up, but use java - jar ofbiz.jar
   - set 'check-on-start' to false
   - set 'add-missing-on-start' to false
   - set 'check-inidices-on-start' to false

Best regards,


Pierre Smits

ORRTIZ.COM 
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Fri, Mar 17, 2017 at 1:10 PM, Bahaa Alamood <
balam...@arcdigitalsolutionsandconsultancy.com> wrote:

> Hello,
>
> I have an of biz installation and it is used daily for accounting and
> other things, however I am having to restart the server every week to keep
> the performance at an  acceptable speed. my environment is java 1.8 and the
> server has 4 GB RAM with 2 core processor. I have noticed that the
> performance decreases with time. I start the server with gradle and the
> background option.
>
> Any Ideas why this is happening?
>
>
> --
> Bahaaldin Al-amood
> IQ Tel: +964 (0) 780 926 2103
> US tel: 540 632 1388
> email: ba...@arcdsc.com
> Skype ID: bahaa.alamood
>
> Arc Digital Solutions and Consultancy
> www.arcdsc.com
>
> This message contains information that may be confidential
> and privileged to Arc digital Solutions and Consultancy, its partners, or
> customers.
> Unauthorized use is strictly prohibited. Unless you are the
> addressee (or authorized to receive mail for the addressee),
> you should not use, copy or disclose to anyone this message
> or any information contained in this message. If you have
> received this message in error, please so advise the sender
> by reply e-mail and delete this message. Thank you for your
> cooperation.
>
>


Re: performance

2017-03-17 Thread Bahaa Alamood

Dear Taher,

Thanks that helped, it is much faster now. I will report back in a week 
to see if the performance degrades or not after that. thanks again



On 3/17/2017 8:31 AM, Taher Alkhateeb wrote:

Hi Bahaa,

It's hard to tell without looking at some details. Did you perform any 
kind of production optimization as mentioned in [1]?


[1] 
https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide


On Mar 17, 2017 3:11 PM, "Bahaa Alamood" 
> wrote:


Hello,

I have an of biz installation and it is used daily for accounting
and other things, however I am having to restart the server every
week to keep the performance at an acceptable speed. my
environment is java 1.8 and the server has 4 GB RAM with 2 core
processor. I have noticed that the performance decreases with
time. I start the server with gradle and the background option.

Any Ideas why this is happening?


-- 
Bahaaldin Al-amood

IQ Tel: +964 (0) 780 926 2103

US tel: 540 632 1388 
email: ba...@arcdsc.com 
Skype ID: bahaa.alamood

Arc Digital Solutions and Consultancy
www.arcdsc.com 

This message contains information that may be confidential
and privileged to Arc digital Solutions and Consultancy, its
partners, or customers.
Unauthorized use is strictly prohibited. Unless you are the
addressee (or authorized to receive mail for the addressee),
you should not use, copy or disclose to anyone this message
or any information contained in this message. If you have
received this message in error, please so advise the sender
by reply e-mail and delete this message. Thank you for your
cooperation.





Re: performance

2017-03-17 Thread Taher Alkhateeb
Hi Bahaa,

It's hard to tell without looking at some details. Did you perform any kind
of production optimization as mentioned in [1]?

[1]
https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide

On Mar 17, 2017 3:11 PM, "Bahaa Alamood" <
balam...@arcdigitalsolutionsandconsultancy.com> wrote:

> Hello,
>
> I have an of biz installation and it is used daily for accounting and
> other things, however I am having to restart the server every week to keep
> the performance at an  acceptable speed. my environment is java 1.8 and the
> server has 4 GB RAM with 2 core processor. I have noticed that the
> performance decreases with time. I start the server with gradle and the
> background option.
>
> Any Ideas why this is happening?
>
>
> --
> Bahaaldin Al-amood
> IQ Tel: +964 (0) 780 926 2103
> US tel: 540 632 1388
> email: ba...@arcdsc.com
> Skype ID: bahaa.alamood
>
> Arc Digital Solutions and Consultancy
> www.arcdsc.com
>
> This message contains information that may be confidential
> and privileged to Arc digital Solutions and Consultancy, its partners, or
> customers.
> Unauthorized use is strictly prohibited. Unless you are the
> addressee (or authorized to receive mail for the addressee),
> you should not use, copy or disclose to anyone this message
> or any information contained in this message. If you have
> received this message in error, please so advise the sender
> by reply e-mail and delete this message. Thank you for your
> cooperation.
>
>


Re: Performance of Ofbiz

2012-05-02 Thread hzzg6y
Please  can  someone help me with performance tips for Ofbiz. I am really
struggling to get to high performance of the ecommerce site.

Rgds,

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4602795.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-05-02 Thread Hans Bakker

check my blog i wrote sometime ago

http://www.antwebsystems.com/control/ViewBlogArticle?contentId=16640

Regards,
Hans

On 05/02/2012 05:16 PM, hzzg6y wrote:

Please  can  someone help me with performance tips for Ofbiz. I am really
struggling to get to high performance of the ecommerce site.

Rgds,

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4602795.html
Sent from the OFBiz - User mailing list archive at Nabble.com.




Re: Performance of Ofbiz

2012-05-02 Thread Scott Gray
In regards to one part of that post, I wouldn't recommend disabling Visit 
tracking for ecommerce unless you have some other type of analytics in place.  
It can be an invaluable resource for tracking down slow pages and also aid in 
locating requests are causing errors in the logs.

Regards
Scott

On 2/05/2012, at 10:22 PM, Hans Bakker wrote:

 check my blog i wrote sometime ago
 
 http://www.antwebsystems.com/control/ViewBlogArticle?contentId=16640
 
 Regards,
 Hans
 
 On 05/02/2012 05:16 PM, hzzg6y wrote:
 Please  can  someone help me with performance tips for Ofbiz. I am really
 struggling to get to high performance of the ecommerce site.
 
 Rgds,
 
 --
 View this message in context: 
 http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4602795.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.
 



Re: Performance of Ofbiz

2012-05-02 Thread hzzg6y
Thanks a lot to Hans  Scott for prompt response. 

Scott,

   If we don't disable visit function, do we have  any other choice.
Ecommerce site should be working like amazon.com else it is of NO use. We
need to make ofbiz with top performance as normal PHP+MYSQL site else we
will lose visitors  one day we have shut down the business. Please advice
if you have any recommendation. 

Secondly, Hans in your article at the bottom you mentioned about FTL. Please
can you provide some details on the below recommendation. How can I acheive
below. 

We recently found out that retrieving database data inside an ftl is not a
good idea, not only bad practice but very slow. Retrieving data should be,
as much as possible, only be done in the 'action' part of screens.

One person ( Anil ) informed that  I also tried the one thing where I've
render the FTL directly in view map instead of rendering it in screen and it
saves my 50 % time. 

Please note that I have 2GB Centos 6 VPS server with postgre  JDK 7  -  $
svn co https://svn.apache.org/repos/asf/ofbiz/trunk ofbiz


Rgds, 

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603098.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-05-02 Thread Adrian Crum
This thread illustrates the fundamental problem with most performance 
tuning advice - there are no statistics, no metrics, no examples, etc. 
In other words, there is no concrete information to base a decision on.


I would recommend hiring a qualified and experienced professional to 
evaluate your site.


-Adrian

On 5/2/2012 1:46 PM, hzzg6y wrote:

Thanks a lot to Hans  Scott for prompt response.

Scott,

If we don't disable visit function, do we have  any other choice.
Ecommerce site should be working like amazon.com else it is of NO use. We
need to make ofbiz with top performance as normal PHP+MYSQL site else we
will lose visitors  one day we have shut down the business. Please advice
if you have any recommendation.

Secondly, Hans in your article at the bottom you mentioned about FTL. Please
can you provide some details on the below recommendation. How can I acheive
below.

We recently found out that retrieving database data inside an ftl is not a
good idea, not only bad practice but very slow. Retrieving data should be,
as much as possible, only be done in the 'action' part of screens.

One person ( Anil ) informed that  I also tried the one thing where I've
render the FTL directly in view map instead of rendering it in screen and it
saves my 50 % time. 

Please note that I have 2GB Centos 6 VPS server with postgre  JDK 7  -  $
svn co https://svn.apache.org/repos/asf/ofbiz/trunk ofbiz


Rgds,

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603098.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-05-02 Thread Scott Gray
Exactly, you need to perform (or have on performed on your behalf) analysis of 
the site.  There are plenty of OFBiz sites out there that perform just fine 
with nothing much more than correctly configured cache settings.

Regards
Scott

On 3/05/2012, at 1:06 AM, Adrian Crum wrote:

 This thread illustrates the fundamental problem with most performance tuning 
 advice - there are no statistics, no metrics, no examples, etc. In other 
 words, there is no concrete information to base a decision on.
 
 I would recommend hiring a qualified and experienced professional to evaluate 
 your site.
 
 -Adrian
 
 On 5/2/2012 1:46 PM, hzzg6y wrote:
 Thanks a lot to Hans  Scott for prompt response.
 
 Scott,
 
If we don't disable visit function, do we have  any other choice.
 Ecommerce site should be working like amazon.com else it is of NO use. We
 need to make ofbiz with top performance as normal PHP+MYSQL site else we
 will lose visitors  one day we have shut down the business. Please advice
 if you have any recommendation.
 
 Secondly, Hans in your article at the bottom you mentioned about FTL. Please
 can you provide some details on the below recommendation. How can I acheive
 below.
 
 We recently found out that retrieving database data inside an ftl is not a
 good idea, not only bad practice but very slow. Retrieving data should be,
 as much as possible, only be done in the 'action' part of screens.
 
 One person ( Anil ) informed that  I also tried the one thing where I've
 render the FTL directly in view map instead of rendering it in screen and it
 saves my 50 % time. 
 
 Please note that I have 2GB Centos 6 VPS server with postgre  JDK 7  -  $
 svn co https://svn.apache.org/repos/asf/ofbiz/trunk ofbiz
 
 
 Rgds,
 
 --
 View this message in context: 
 http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603098.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Performance of Ofbiz

2012-05-02 Thread Mike
Try switching java.  Download java from sun and modify the startup script
to use it.  I place java in /opt, like this:

root@vm-121:/opt# ls -al /opt
lrwxrwxrwx  1 root  root12 2012-03-04 15:36 java - jdk1.6.0_31/
drwxr-xr-x 10 root  root  4096 2012-03-04 15:36 jdk1.6.0_31

I then reference it as /opt/java/bin/java.

On Wed, May 2, 2012 at 3:16 AM, hzzg6y rupadh...@gmail.com wrote:

 Please  can  someone help me with performance tips for Ofbiz. I am really
 struggling to get to high performance of the ecommerce site.

 Rgds,

 --
 View this message in context:
 http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4602795.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Performance of Ofbiz

2012-05-02 Thread hzzg6y
I somehow want to redue the startup time for my ecommerce  site. Below are
some threads posted by Cameron - information which I need to know whether it
is valid today or not. 

1. Logging. 
In debug.properties, log only to file and not stdout. 
Set logging to WARN for everything. 

2. Modules. 
a. Remove all modules from hot-deploy and specialized 
except the ones you actually use.  You might also be 
able to remove some of the modules in applications but 
they do not have a hierarchical dependency, so you can 
probably only remove one or two. We only removed the 
marketing module, David has been quite clear about 
this in previous posts - its generally more trouble 
than its worth. 
b. WITHIN the modules, deactivate any webapp you ain't 
using (simply comment out the relevant part in 
ofbiz-component.xml).  For example, the only module we 
left up, apart from our own custom module, was 
webtools. 

3. Containers 
a. For a standard webapp system, we found that we can 
get by with only the following 5 containers, we 
removed everything else: 
 component-container 
 classloader-container 
 naming-container 
 catalina-container 

b. Inside catalina-container, only activate the 
containers you need - very often it is only http, 
https or ajp, depending on your setup 

4. Memory. 
a. Give the JVM at least 384Mb of memory, otherwise it 
really has trouble setting everything up.  You can set 
this either in startofbiz.bat/sh, or in service.conf 
if you are running as a windows service (see my recent 
tutorial on wiki). 

There are some other points to explore, which for 
various reasons I haven't tried yet. 

5. Entity Engine 
OFBiz does a lot of clever stuff when it starts up to 
match XML entity definitions with what is actually in 
the DB.  But in a production system you aren't going 
to change this very regularly.  So theoretically you 
should switch it off, and shave off a couple more 
seconds at start up. 
In practice, I only managed the following config for 
my delegator in entityengine.xml: 
check-on-start=true 
add-missing-on-start=true 
check-pks-on-start=false 

I wanted to set all 3 to false, but when I did this, 
the JVM went into an endless loop and then bust with 
an OutOfMemoryError.  If anyone could shed any light 
I'd be grateful. 

6. JDK 1.6 
I have run my application without any probs on JDK1.6, 
 which is supposed to up to a zillion % faster than 
1.5 in certain situations according to SUN.  But I 
haven't taken any measurements yet, will let you know 
when I do. 

7. JNDI 
From what I have seen of OFBiz internals so far, it 
doesn't really use JNDI for much.  So I will 
investigate taking out this container as well, as for 
my scenario, I am not getting anything from JNDI. 





  

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603549.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-05-02 Thread hzzg6y
Mike,

   Thanks ... You mean that JDK6 is better than JDK7 (
jdk-7u4-linux-x64.rpm ).  Please  clarify that whether I should use the old
version of JDK which finely tuned with Ofbiz. 

Rgsd


--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603558.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-05-02 Thread hzzg6y
Since We are using Postgresql. Is it the issue with DB. We can fine to switch
to MYSQL but performance need to be improved for ecommerce site. 

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603628.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-05-02 Thread Mike
Try running pgtune for postgres and set the figures 30-50% (or more) higher.

pgtune -i /etc/postgresql/8.4/main/postgresql.conf

Requires a restart.

Regarding java, yes, use the latest 1.6 java from sun (only).

On Wed, May 2, 2012 at 8:53 AM, hzzg6y rupadh...@gmail.com wrote:

 Since We are using Postgresql. Is it the issue with DB. We can fine to
 switch
 to MYSQL but performance need to be improved for ecommerce site.

 --
 View this message in context:
 http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603628.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Performance of Ofbiz

2012-05-02 Thread Sanjeev Gupta
Also try configuring Apache HTTP server as a fronted to Ofbiz server.
Although it will add an additional layer in the architecture, it will handle
all static and cached content rendering to browser and improve your app
server's performance. 

That said, please do to keep in mind that a Java bases server can't be tuned
to perform like the LAMP stack. both have their own merits and demerits, but
when it come to performance in small deployments, Java stack can't match the
LAMP stack. 

-
Rgds
Sanjeev
www.sanjeevg.com
@sanjeevgcom
--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603804.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-05-02 Thread Deepak Agarwal
Following has benifited me:
1)  -Xms1024M -Xmx2048M -XX:MaxPermSize=1024m(Increased the PermSize
from 512 to 1024)
2) Increased innodb_lock_wait_timeout from 50 sec to 300 sec in mysql
3) Added following in mysql
 a) table_cache=1000
 b) table_definition_cache=1000
 c) query_cache_type=1
 d) query-cache-size = 20M
 e) query_cache_limit=20M
  f) open_files_limit=4000
4) Modified framework/base/config/cache.properties to use softreferences
5) Modified ofbiz-container.xml connector at 8080 to use GZip for js and
css.
6) Increased the number of threads to 400 for tomcat container
7) Decreased the connection time out to 3 seconds.

Our box has 2 CPU and 8 GB or RAM .


On Wed, May 2, 2012 at 10:23 PM, Sanjeev Gupta subscr...@sanjeevg.comwrote:

 Also try configuring Apache HTTP server as a fronted to Ofbiz server.
 Although it will add an additional layer in the architecture, it will
 handle
 all static and cached content rendering to browser and improve your app
 server's performance.

 That said, please do to keep in mind that a Java bases server can't be
 tuned
 to perform like the LAMP stack. both have their own merits and demerits,
 but
 when it come to performance in small deployments, Java stack can't match
 the
 LAMP stack.

 -
 Rgds
 Sanjeev
 www.sanjeevg.com
 @sanjeevgcom
 --
 View this message in context:
 http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4603804.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.

 --
 Thanks,
 Deepak Agarwal,

 Paxcel Technologies Pvt Ltd.
 Hartron Complex, Sector 18, Gurgaon, India.
 E-Mail: deepak.agar...@paxcel.net
 Mobile: +91 9910322604




Re: Performance of Ofbiz

2012-04-25 Thread Mike
First thing to check is if mysql is properly tuned.  With the huge number
of tables, it is important that the table cache is large.  Try running
tuning-primer.sh on the DB host and make changes as recommended.

https://launchpad.net/mysql-tuning-primer

On Wed, Apr 25, 2012 at 5:26 AM, hzzg6y rupadh...@gmail.com wrote:

 Dear All,

I have just started using the Ofbiz for my ecommerce website.
 However I am seeing a huge performance problems with ofbiz.  My website is
 quite slow compared to many other websites on ecommerce. I have modified
 cache Settings ( cache.properties)   debug properties ( debug.properties
 ),
 however I still see that Widgets take lot of time to load. Earlier I have
 experience with MYSQL + PHP + SMARTY template engine. In this case whenever
 I type the website URL, websiite immediately opens however here at ofbiz it
 is taking a while to open the front page. This will impact visitors on my
 website.
 Please can someone advice me on any best Frontend GUI which works with
 OFbiz
 with super performance.  Sorry I don't have benchmark or data to prove this
 however it is by visual inspection for last one month.

 I am using trunk : $ svn co http://svn.apache.org/repos/asf/ofbiz/trunk
 ofbiz

 Rgs,





 --
 View this message in context:
 http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4586418.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Performance of Ofbiz

2012-04-25 Thread hzzg6y
No, I am using Postgresql not MYSQL. 

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4587311.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance of Ofbiz

2012-04-25 Thread madppiper
Well, there certainly are ways to push ofbiz. 

Have you taken a look at Syracus? www.syracus.net

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-of-Ofbiz-tp4586418p4587352.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread Deyan Tsvetanov
Hi guys,  

removing synchronized from begin( int timeout) will cause issues. 
The problematic code is the following:
(starting from line 180 in TransactionUtil.java  - trunk )

 // reset the transaction stamps, just in case...
 
clearTransactionStamps();
// initialize the start stamp
getTransactionStartStamp();
// set the tx begin stack placeholder
setTransactionBeginStack();

So the synchronized begin() is a huge bottleneck and imho it can't be
solved without coding. Caching is not a solution. 
I think the transaction timestamps and the transaction begin stack have
to be moved to the UserTransaction so they are not static anymore. 
In general TransactionUtil needs some rework. 

Cheers, 
Deyan 

On Mon, 2010-05-31 at 14:34 -0600, David E Jones wrote:
 The theory that Martin mentioned is interesting, and quite possible. Have you 
 tried removing the synchronized keyword from the begin method to see if it 
 helps?
 
 That would just be to test the theory, and if that does turn out to be the 
 bottleneck then the sensitive parts of the method should be synchronized (or 
 put into separate synchronized methods) instead of snycing the whole method.
 
 -David
 
 
 On May 31, 2010, at 2:24 PM, Karl Pitrich wrote:
 
  Hi,
  
  I'm working with Martin on this project.
  
  We have commented the various cache options as described in the Wiki (and 
  mailing list), 
  EXPIRE TIME is 0 in all except for product.* when viewing 
  /webtools/control/FindUtilCache
  
  Logging is disabled, as are several components.
  Also, we have disabled several content elements from the template, such as 
  recommendations or polls, etc.
  
  
  Any help is appreciated,
  Greetings,
  
  - Karl
  
  On 31.05.2010, at 22:07, Jacques Le Roux wrote:
  
  1st level of answer, did you set caches?
  https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
  https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan
  
  Jacques
  
  From: Martin Kreidenweis martin.kreidenw...@tngtech.com
  Hi,
  
  we are currently evaluating Apache OFBiz for use in one of our projects.
  
  We expect a high load on our application. So we did a test with jMeter
  on the sample ecommerce application with 100 parallel sessions and in
  average 400 msec (randomized) wait time between requests.
  
  During profiling we experienced that
  org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
  dominating method invoked and the application spends about 75% of total
  time in this method.
  This results in page load times over 10 seconds and growing.
  
  Many threads are blocked because the method is defined as static and
  synchronized.
  
  We are using MySQL as a database backend in our test setup and
  deactivated all informational logging (even server hit statistics), and
  most of the sidebar widgets.
  
  Any suggestions/ideas are highly appreciated.
  Thanks.
  
  Best regards,
  Martin
 




Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread Deyan Tsvetanov
I take my words back about the workaround. 
It's much more complicated. 

On Tue, 2010-06-01 at 09:23 +0300, Deyan Tsvetanov wrote:
 Hi guys,  
 
 removing synchronized from begin( int timeout) will cause issues. 
 The problematic code is the following:
 (starting from line 180 in TransactionUtil.java  - trunk )
 
  // reset the transaction stamps, just in case...
  
 clearTransactionStamps();
 // initialize the start stamp
 getTransactionStartStamp();
 // set the tx begin stack placeholder
 setTransactionBeginStack();
 
 So the synchronized begin() is a huge bottleneck and imho it can't be
 solved without coding. Caching is not a solution. 
 I think the transaction timestamps and the transaction begin stack have
 to be moved to the UserTransaction so they are not static anymore. 
 In general TransactionUtil needs some rework. 
 
 Cheers, 
 Deyan 
 
 On Mon, 2010-05-31 at 14:34 -0600, David E Jones wrote:
  The theory that Martin mentioned is interesting, and quite possible. Have 
  you tried removing the synchronized keyword from the begin method to see if 
  it helps?
  
  That would just be to test the theory, and if that does turn out to be the 
  bottleneck then the sensitive parts of the method should be synchronized 
  (or put into separate synchronized methods) instead of snycing the whole 
  method.
  
  -David
  
  
  On May 31, 2010, at 2:24 PM, Karl Pitrich wrote:
  
   Hi,
   
   I'm working with Martin on this project.
   
   We have commented the various cache options as described in the Wiki (and 
   mailing list), 
   EXPIRE TIME is 0 in all except for product.* when viewing 
   /webtools/control/FindUtilCache
   
   Logging is disabled, as are several components.
   Also, we have disabled several content elements from the template, such 
   as recommendations or polls, etc.
   
   
   Any help is appreciated,
   Greetings,
   
   - Karl
   
   On 31.05.2010, at 22:07, Jacques Le Roux wrote:
   
   1st level of answer, did you set caches?
   https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
   https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan
   
   Jacques
   
   From: Martin Kreidenweis martin.kreidenw...@tngtech.com
   Hi,
   
   we are currently evaluating Apache OFBiz for use in one of our projects.
   
   We expect a high load on our application. So we did a test with jMeter
   on the sample ecommerce application with 100 parallel sessions and in
   average 400 msec (randomized) wait time between requests.
   
   During profiling we experienced that
   org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
   dominating method invoked and the application spends about 75% of total
   time in this method.
   This results in page load times over 10 seconds and growing.
   
   Many threads are blocked because the method is defined as static and
   synchronized.
   
   We are using MySQL as a database backend in our test setup and
   deactivated all informational logging (even server hit statistics), and
   most of the sidebar widgets.
   
   Any suggestions/ideas are highly appreciated.
   Thanks.
   
   Best regards,
   Martin
  
 
 




Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread rrhati2010

Thanks for the findings and suggestionseven I am facing the same problem
deploying in Jboss4.2 and tested with Jmeter for it's performance.

Everytime I start putting load on server it gets me Error: OutofMemory or
OutofSwapSpace or Not able to create a new native thread even though there
is enough heap memory(around 512M free).

I have raised this issue on JIRA also: OFBIZ-3707 

Further I will try to implement your suggestions and let you know the
results.

Thanks,
RRH


-
RRH
-- 
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-issue-org-ofbiz-entity-transaction-TransactionUtil-seems-to-be-bottleneck-tp2237641p2238037.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread Deyan Tsvetanov
Hi rhh,  

this looks like a different issue. 
It is a memory leak and imho has nothing to do with the synchronized
TransactionUtil.begin() and commit() methods. 


First you have to check out the max heap memory set for JBoss. Look for
an option -Xmx256m. 
Increase it to 1024m. 

If the test still produces OutOfMemory than there is a memory leak for
sure. 

-- Deyan 


On Mon, 2010-05-31 at 22:35 -0700, rrhati2010 wrote:
 Thanks for the findings and suggestionseven I am facing the same problem
 deploying in Jboss4.2 and tested with Jmeter for it's performance.
 
 Everytime I start putting load on server it gets me Error: OutofMemory or
 OutofSwapSpace or Not able to create a new native thread even though there
 is enough heap memory(around 512M free).
 
 I have raised this issue on JIRA also: OFBIZ-3707 
 
 Further I will try to implement your suggestions and let you know the
 results.
 
 Thanks,
 RRH
 
 
 -
 RRH




Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread rrhati2010

Hi  Deyan,

I have tried out these things i.e (option -Xmx256m Increase it to 1024m).

The Server runs fine with 2-5 users load, but goes out of memory for 100
users load when tested with Jmeter for it's performance.

Do I need to profile the Ofbiz code.

Or, Can u suggest any other solution.

-
RRH
-- 
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Performance-issue-org-ofbiz-entity-transaction-TransactionUtil-seems-to-be-bottleneck-tp2237641p2238095.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread Deyan Tsvetanov
Hi rhh, 

yes, it looks like a memory leak. 
When you have a memory leak you have to profile each component you have
doubts about. 

What screens have you tested with jMeter ?
You have to run a profiler, start the jMeter test again and if possible
- share the results. After that we could analyze the code and see if
there is any memory leak. 

-- Deyan 

On Tue, 2010-06-01 at 00:05 -0700, rrhati2010 wrote:
 Hi  Deyan,
 
 I have tried out these things i.e (option -Xmx256m Increase it to 1024m).
 
 The Server runs fine with 2-5 users load, but goes out of memory for 100
 users load when tested with Jmeter for it's performance.
 
 Do I need to profile the Ofbiz code.
 
 Or, Can u suggest any other solution.
 
 -
 RRH




Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread Martin Kreidenweis
Hi,

we probably found a simple solution for the synchronized begin()
problem. We set the TransactionUtil.debugResources flag to false; so no
more DebugXaResources are created in the begin() method, which seems to
be the problematic (performance-wise) part.
Now this method is a lot less problematic, judging from the profiler output.
I'm not exactly sure what the code does that's not run any more. But
judging from its name (debug) it shouldn't have any adverse effects in
a production setting, should it?

Best Regards
Martin


On 01.06.2010 08:23, Deyan Tsvetanov wrote:
 Hi guys,  
 
 removing synchronized from begin( int timeout) will cause issues. 
 The problematic code is the following:
 (starting from line 180 in TransactionUtil.java  - trunk )
 
  // reset the transaction stamps, just in case...
  
 clearTransactionStamps();
 // initialize the start stamp
 getTransactionStartStamp();
 // set the tx begin stack placeholder
 setTransactionBeginStack();
 
 So the synchronized begin() is a huge bottleneck and imho it can't be
 solved without coding. Caching is not a solution. 
 I think the transaction timestamps and the transaction begin stack have
 to be moved to the UserTransaction so they are not static anymore. 
 In general TransactionUtil needs some rework. 
 
 Cheers, 
 Deyan 
 
 On Mon, 2010-05-31 at 14:34 -0600, David E Jones wrote:
 The theory that Martin mentioned is interesting, and quite possible. Have 
 you tried removing the synchronized keyword from the begin method to see if 
 it helps?

 That would just be to test the theory, and if that does turn out to be the 
 bottleneck then the sensitive parts of the method should be synchronized (or 
 put into separate synchronized methods) instead of snycing the whole method.

 -David


 On May 31, 2010, at 2:24 PM, Karl Pitrich wrote:

 Hi,

 I'm working with Martin on this project.

 We have commented the various cache options as described in the Wiki (and 
 mailing list), 
 EXPIRE TIME is 0 in all except for product.* when viewing 
 /webtools/control/FindUtilCache

 Logging is disabled, as are several components.
 Also, we have disabled several content elements from the template, such as 
 recommendations or polls, etc.


 Any help is appreciated,
 Greetings,

 - Karl

 On 31.05.2010, at 22:07, Jacques Le Roux wrote:

 1st level of answer, did you set caches?
 https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
 https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan

 Jacques

 From: Martin Kreidenweis martin.kreidenw...@tngtech.com
 Hi,

 we are currently evaluating Apache OFBiz for use in one of our projects.

 We expect a high load on our application. So we did a test with jMeter
 on the sample ecommerce application with 100 parallel sessions and in
 average 400 msec (randomized) wait time between requests.

 During profiling we experienced that
 org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
 dominating method invoked and the application spends about 75% of total
 time in this method.
 This results in page load times over 10 seconds and growing.

 Many threads are blocked because the method is defined as static and
 synchronized.

 We are using MySQL as a database backend in our test setup and
 deactivated all informational logging (even server hit statistics), and
 most of the sidebar widgets.

 Any suggestions/ideas are highly appreciated.
 Thanks.

 Best regards,
 Martin



Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread David E Jones

To be clear, I wasn't recommending that we remove synchronized from the begin 
method in OFBiz, just that they remove it temporarily and then redo their 
performance tests to see if that really is the problem.

You're absolutely right that more work will be necessary to localize the 
synchronization to avoid bottlenecks on a larger block of code.

BTW, the three sub-method calls you mentioned should all only deal with 
thread-local variables... aren't those thread-safe to use?

-David


On Jun 1, 2010, at 12:42 AM, Deyan Tsvetanov wrote:

 I take my words back about the workaround. 
 It's much more complicated. 
 
 On Tue, 2010-06-01 at 09:23 +0300, Deyan Tsvetanov wrote:
 Hi guys,  
 
 removing synchronized from begin( int timeout) will cause issues. 
 The problematic code is the following:
 (starting from line 180 in TransactionUtil.java  - trunk )
 
 // reset the transaction stamps, just in case...
 
 clearTransactionStamps();
 // initialize the start stamp
 getTransactionStartStamp();
 // set the tx begin stack placeholder
 setTransactionBeginStack();
 
 So the synchronized begin() is a huge bottleneck and imho it can't be
 solved without coding. Caching is not a solution. 
 I think the transaction timestamps and the transaction begin stack have
 to be moved to the UserTransaction so they are not static anymore. 
 In general TransactionUtil needs some rework. 
 
 Cheers, 
 Deyan 
 
 On Mon, 2010-05-31 at 14:34 -0600, David E Jones wrote:
 The theory that Martin mentioned is interesting, and quite possible. Have 
 you tried removing the synchronized keyword from the begin method to see if 
 it helps?
 
 That would just be to test the theory, and if that does turn out to be the 
 bottleneck then the sensitive parts of the method should be synchronized 
 (or put into separate synchronized methods) instead of snycing the whole 
 method.
 
 -David
 
 
 On May 31, 2010, at 2:24 PM, Karl Pitrich wrote:
 
 Hi,
 
 I'm working with Martin on this project.
 
 We have commented the various cache options as described in the Wiki (and 
 mailing list), 
 EXPIRE TIME is 0 in all except for product.* when viewing 
 /webtools/control/FindUtilCache
 
 Logging is disabled, as are several components.
 Also, we have disabled several content elements from the template, such as 
 recommendations or polls, etc.
 
 
 Any help is appreciated,
 Greetings,
 
 - Karl
 
 On 31.05.2010, at 22:07, Jacques Le Roux wrote:
 
 1st level of answer, did you set caches?
 https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
 https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan
 
 Jacques
 
 From: Martin Kreidenweis martin.kreidenw...@tngtech.com
 Hi,
 
 we are currently evaluating Apache OFBiz for use in one of our projects.
 
 We expect a high load on our application. So we did a test with jMeter
 on the sample ecommerce application with 100 parallel sessions and in
 average 400 msec (randomized) wait time between requests.
 
 During profiling we experienced that
 org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
 dominating method invoked and the application spends about 75% of total
 time in this method.
 This results in page load times over 10 seconds and growing.
 
 Many threads are blocked because the method is defined as static and
 synchronized.
 
 We are using MySQL as a database backend in our test setup and
 deactivated all informational logging (even server hit statistics), and
 most of the sidebar widgets.
 
 Any suggestions/ideas are highly appreciated.
 Thanks.
 
 Best regards,
 Martin
 
 
 
 
 



Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-06-01 Thread Deyan Tsvetanov
Hi David, 

yes, the thread-local vars are thread safe. However in order to assign
them a synchronized block or method is needed. There is no way to avoid
synchronized block if we want to create a transaction using a static
method without any arguments or without making the caller to keep a
return value in a local variable ( public void
TransactionUtil.begin() ). The begin() method needs to create a
thread-local var and associate it with the currently running thread.  

A workaround could be to use something like : 

UserTransaction transaction = TransactionUtil.createNewTransaction();
//... execute code 
TransactionUtil.commit( transaction );


this way we don't need any thread-local vars. 
However this approach would require to make lots of fixes in the
existing code and this can not happen quickly. 

We've got to think of something else.

-- Deyan

On Tue, 2010-06-01 at 03:16 -0600, David E Jones wrote:
 To be clear, I wasn't recommending that we remove synchronized from the begin 
 method in OFBiz, just that they remove it temporarily and then redo their 
 performance tests to see if that really is the problem.
 
 You're absolutely right that more work will be necessary to localize the 
 synchronization to avoid bottlenecks on a larger block of code.
 
 BTW, the three sub-method calls you mentioned should all only deal with 
 thread-local variables... aren't those thread-safe to use?
 
 -David
 
 
 On Jun 1, 2010, at 12:42 AM, Deyan Tsvetanov wrote:
 
  I take my words back about the workaround. 
  It's much more complicated. 
  
  On Tue, 2010-06-01 at 09:23 +0300, Deyan Tsvetanov wrote:
  Hi guys,  
  
  removing synchronized from begin( int timeout) will cause issues. 
  The problematic code is the following:
  (starting from line 180 in TransactionUtil.java  - trunk )
  
  // reset the transaction stamps, just in case...
  
  clearTransactionStamps();
  // initialize the start stamp
  getTransactionStartStamp();
  // set the tx begin stack placeholder
  setTransactionBeginStack();
  
  So the synchronized begin() is a huge bottleneck and imho it can't be
  solved without coding. Caching is not a solution. 
  I think the transaction timestamps and the transaction begin stack have
  to be moved to the UserTransaction so they are not static anymore. 
  In general TransactionUtil needs some rework. 
  
  Cheers, 
  Deyan 
  
  On Mon, 2010-05-31 at 14:34 -0600, David E Jones wrote:
  The theory that Martin mentioned is interesting, and quite possible. Have 
  you tried removing the synchronized keyword from the begin method to see 
  if it helps?
  
  That would just be to test the theory, and if that does turn out to be 
  the bottleneck then the sensitive parts of the method should be 
  synchronized (or put into separate synchronized methods) instead of 
  snycing the whole method.
  
  -David
  
  
  On May 31, 2010, at 2:24 PM, Karl Pitrich wrote:
  
  Hi,
  
  I'm working with Martin on this project.
  
  We have commented the various cache options as described in the Wiki 
  (and mailing list), 
  EXPIRE TIME is 0 in all except for product.* when viewing 
  /webtools/control/FindUtilCache
  
  Logging is disabled, as are several components.
  Also, we have disabled several content elements from the template, such 
  as recommendations or polls, etc.
  
  
  Any help is appreciated,
  Greetings,
  
  - Karl
  
  On 31.05.2010, at 22:07, Jacques Le Roux wrote:
  
  1st level of answer, did you set caches?
  https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
  https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan
  
  Jacques
  
  From: Martin Kreidenweis martin.kreidenw...@tngtech.com
  Hi,
  
  we are currently evaluating Apache OFBiz for use in one of our 
  projects.
  
  We expect a high load on our application. So we did a test with jMeter
  on the sample ecommerce application with 100 parallel sessions and in
  average 400 msec (randomized) wait time between requests.
  
  During profiling we experienced that
  org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
  dominating method invoked and the application spends about 75% of total
  time in this method.
  This results in page load times over 10 seconds and growing.
  
  Many threads are blocked because the method is defined as static and
  synchronized.
  
  We are using MySQL as a database backend in our test setup and
  deactivated all informational logging (even server hit statistics), and
  most of the sidebar widgets.
  
  Any suggestions/ideas are highly appreciated.
  Thanks.
  
  Best regards,
  Martin
  
  
  
  
  
 




Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-05-31 Thread Jacques Le Roux

1st level of answer, did you set caches?
https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan

Jacques

From: Martin Kreidenweis martin.kreidenw...@tngtech.com

Hi,

we are currently evaluating Apache OFBiz for use in one of our projects.

We expect a high load on our application. So we did a test with jMeter
on the sample ecommerce application with 100 parallel sessions and in
average 400 msec (randomized) wait time between requests.

During profiling we experienced that
org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
dominating method invoked and the application spends about 75% of total
time in this method.
This results in page load times over 10 seconds and growing.

Many threads are blocked because the method is defined as static and
synchronized.

We are using MySQL as a database backend in our test setup and
deactivated all informational logging (even server hit statistics), and
most of the sidebar widgets.

Any suggestions/ideas are highly appreciated.
Thanks.

Best regards,
Martin






Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-05-31 Thread Karl Pitrich
Hi,

I'm working with Martin on this project.

We have commented the various cache options as described in the Wiki (and 
mailing list), 
EXPIRE TIME is 0 in all except for product.* when viewing 
/webtools/control/FindUtilCache

Logging is disabled, as are several components.
Also, we have disabled several content elements from the template, such as 
recommendations or polls, etc.


Any help is appreciated,
Greetings,

 - Karl

On 31.05.2010, at 22:07, Jacques Le Roux wrote:

 1st level of answer, did you set caches?
 https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
 https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan
 
 Jacques
 
 From: Martin Kreidenweis martin.kreidenw...@tngtech.com
 Hi,
 
 we are currently evaluating Apache OFBiz for use in one of our projects.
 
 We expect a high load on our application. So we did a test with jMeter
 on the sample ecommerce application with 100 parallel sessions and in
 average 400 msec (randomized) wait time between requests.
 
 During profiling we experienced that
 org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
 dominating method invoked and the application spends about 75% of total
 time in this method.
 This results in page load times over 10 seconds and growing.
 
 Many threads are blocked because the method is defined as static and
 synchronized.
 
 We are using MySQL as a database backend in our test setup and
 deactivated all informational logging (even server hit statistics), and
 most of the sidebar widgets.
 
 Any suggestions/ideas are highly appreciated.
 Thanks.
 
 Best regards,
 Martin


Re: Performance issue: org.ofbiz.entity.transaction.TransactionUtil seems to be bottleneck

2010-05-31 Thread David E Jones

The theory that Martin mentioned is interesting, and quite possible. Have you 
tried removing the synchronized keyword from the begin method to see if it 
helps?

That would just be to test the theory, and if that does turn out to be the 
bottleneck then the sensitive parts of the method should be synchronized (or 
put into separate synchronized methods) instead of snycing the whole method.

-David


On May 31, 2010, at 2:24 PM, Karl Pitrich wrote:

 Hi,
 
 I'm working with Martin on this project.
 
 We have commented the various cache options as described in the Wiki (and 
 mailing list), 
 EXPIRE TIME is 0 in all except for product.* when viewing 
 /webtools/control/FindUtilCache
 
 Logging is disabled, as are several components.
 Also, we have disabled several content elements from the template, such as 
 recommendations or polls, etc.
 
 
 Any help is appreciated,
 Greetings,
 
 - Karl
 
 On 31.05.2010, at 22:07, Jacques Le Roux wrote:
 
 1st level of answer, did you set caches?
 https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings
 https://cwiki.apache.org/confluence/display/OFBADMIN/Scaling+and+Performance+Plan
 
 Jacques
 
 From: Martin Kreidenweis martin.kreidenw...@tngtech.com
 Hi,
 
 we are currently evaluating Apache OFBiz for use in one of our projects.
 
 We expect a high load on our application. So we did a test with jMeter
 on the sample ecommerce application with 100 parallel sessions and in
 average 400 msec (randomized) wait time between requests.
 
 During profiling we experienced that
 org.ofbiz.entity.transaction.TransactionUtil.begin() is by far the
 dominating method invoked and the application spends about 75% of total
 time in this method.
 This results in page load times over 10 seconds and growing.
 
 Many threads are blocked because the method is defined as static and
 synchronized.
 
 We are using MySQL as a database backend in our test setup and
 deactivated all informational logging (even server hit statistics), and
 most of the sidebar widgets.
 
 Any suggestions/ideas are highly appreciated.
 Thanks.
 
 Best regards,
 Martin



Re: Performance issues

2009-05-14 Thread snowch

Problem solved:

Many thanks for the replies...

Chris

...
FileInputStream in = new FileInputStream(filename);
bytes = IOUtils.toByteArray(in);
in.close();

response.setHeader(Content-Type, image/jpeg);
response.setDateHeader(Expires,  System.currentTimeMillis(  ) +
24*60*60*1000);
response.setHeader(Content-Disposition, attachment;filename= +
upliftNumber + _ + imgNum + .jpg);

OutputStream out;
if (MyUtil.acceptsGZIP(request))
{
response.setHeader(Content-Encoding, gzip);
out = new GZIPOutputStream(response.getOutputStream(  ));
}
else {
out = response.getOutputStream(  );
}
IOUtils.write(bytes, out);
out.flush();
out.close();



snowch wrote:
 
 Hi Forum,
 
 My application needs to serve images to users but each image request is
 checked to ensure the user has permission to view the image.  To do this,
 I have created a custom bsh servlet to serve the images for a ftl page
 (which are included using   tags).  There can be 20 to 30 images per page. 
 The images are around 40Kb.  The page is currently taking 20+ seconds to
 load the images.  I have noticed in the log that there be a few second
 delay between the ImageServlet finishing and the next request being
 handled by the ContextFilter (see below).
 
 Does anyone on this forum have any idea what can be causing the delay?
 
 Many thanks in advance,
 
 Chris
 
 2009-05-11 20:37:56,097 (TP-Processor3) [
 ControlServlet.java:256:DEBUG] [[[ImageServlet] Done rendering page,
 Servlet Finished- total:0.188,since last([ImageServlet] Se...):0.125]]
 2009-05-11 20:37:56,112 (TP-Processor2) [   
 TransactionUtil.java:187:DEBUG] [TransactionUtil.commit] transaction
 committed
 2009-05-11 20:37:56,112 (TP-Processor2) [
 ControlServlet.java:256:DEBUG] [[[ImageServlet] Done rendering page,
 Servlet Finished- total:0.203,since last([ImageServlet] Se...):0.14]]
 2009-05-11 20:38:01,597 (TP-Processor2) [  ContextFilter.java:182:INFO
 ] [Request]: /xxx/control/ImageServlet
 2009-05-11 20:38:01,612 (TP-Processor3) [  ContextFilter.java:182:INFO
 ] [Request]: /xxx/control/ImageServlet
 
 

-- 
View this message in context: 
http://www.nabble.com/Performance-issues-tp23490557p23552601.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Performance issues

2009-05-11 Thread BJ Freeman
Start with memory allocation, then CPU usage.
Also check if you have the cache turned on

other thing you can do on you page is put a start and stop time that
shows page load time.
see if this is the same as the real time you experience.

there also could be some ways for streamlining your code
however that is beyond the scope of the mailing list.

snowch sent the following on 5/11/2009 1:07 PM:
 Hi Forum,
 
 My application needs to serve images to users but each image request is
 checked to ensure the user has permission to view the image.  To do this, I
 have created a custom bsh servlet to serve the images for a ftl page (which
 are included using   tags).  There can be 20 to 30 images per page.  The
 images are around 40Kb.  The page is currently taking 20+ seconds to load
 the images.  I have noticed in the log that there be a few second delay
 between the ImageServlet finishing and the next request being handled by the
 ContextFilter (see below).
 
 Does anyone on this forum have any idea what can be causing the delay?
 
 Many thanks in advance,
 
 Chris
 
 2009-05-11 20:37:56,097 (TP-Processor3) [ ControlServlet.java:256:DEBUG]
 [[[ImageServlet] Done rendering page, Servlet Finished- total:0.188,since
 last([ImageServlet] Se...):0.125]]
 2009-05-11 20:37:56,112 (TP-Processor2) [TransactionUtil.java:187:DEBUG]
 [TransactionUtil.commit] transaction committed
 2009-05-11 20:37:56,112 (TP-Processor2) [ ControlServlet.java:256:DEBUG]
 [[[ImageServlet] Done rendering page, Servlet Finished- total:0.203,since
 last([ImageServlet] Se...):0.14]]
 2009-05-11 20:38:01,597 (TP-Processor2) [  ContextFilter.java:182:INFO ]
 [Request]: /xxx/control/ImageServlet
 2009-05-11 20:38:01,612 (TP-Processor3) [  ContextFilter.java:182:INFO ]
 [Request]: /xxx/control/ImageServlet
 

-- 
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro
Systems Integrator.



Re: Performance issues

2009-05-11 Thread Harmeet Bedi
For us the following worked
- Look at cache.properties. Change that to cache information. In default dev 
friendly environment xml documents for forms/screens are parsed almost on each 
request
- We were serving images from a remote location. The way ofbiz was serving 
images was Browser - Ofbiz - Fetch remote content. Instead we changed to 
display actual URL of image. Check to see if you your html page has the Image 
URLs.

Hope it helps,
Harmeet

- Original Message -
From: snowch sno...@coralms.com
To: user@ofbiz.apache.org
Sent: Monday, May 11, 2009 4:07:14 PM GMT -05:00 US/Canada Eastern
Subject: Performance issues


Hi Forum,

My application needs to serve images to users but each image request is
checked to ensure the user has permission to view the image.  To do this, I
have created a custom bsh servlet to serve the images for a ftl page (which
are included using   tags).  There can be 20 to 30 images per page.  The
images are around 40Kb.  The page is currently taking 20+ seconds to load
the images.  I have noticed in the log that there be a few second delay
between the ImageServlet finishing and the next request being handled by the
ContextFilter (see below).

Does anyone on this forum have any idea what can be causing the delay?

Many thanks in advance,

Chris

2009-05-11 20:37:56,097 (TP-Processor3) [ ControlServlet.java:256:DEBUG]
[[[ImageServlet] Done rendering page, Servlet Finished- total:0.188,since
last([ImageServlet] Se...):0.125]]
2009-05-11 20:37:56,112 (TP-Processor2) [TransactionUtil.java:187:DEBUG]
[TransactionUtil.commit] transaction committed
2009-05-11 20:37:56,112 (TP-Processor2) [ ControlServlet.java:256:DEBUG]
[[[ImageServlet] Done rendering page, Servlet Finished- total:0.203,since
last([ImageServlet] Se...):0.14]]
2009-05-11 20:38:01,597 (TP-Processor2) [  ContextFilter.java:182:INFO ]
[Request]: /xxx/control/ImageServlet
2009-05-11 20:38:01,612 (TP-Processor3) [  ContextFilter.java:182:INFO ]
[Request]: /xxx/control/ImageServlet

-- 
View this message in context: 
http://www.nabble.com/Performance-issues-tp23490557p23490557.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



RE: performance input

2007-11-03 Thread [EMAIL PROTECTED]
So the Ofbiz server is on the same machine?  Are the remote machines pushing
the data directly to postgres or through the Ofbiz server?

If the later is the case, that would be pretty impressive.

Is this 1000 per second, minute, day?

I am looking at my non-production setup machine and noting that the service
to create an Invoice from a Shipment is taking 6+ seconds.

Skip

-Original Message-
From: BJ Freeman [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 03, 2007 3:59 PM
To: user@ofbiz.apache.org
Subject: performance input


have a 3ghz cpu 1 gig of ram postresql RHE4.
under full load which is reading in 1000 of products from remote sites
parsing the data and crud the products in ofbiz,
besides handling Realtime orders reception, storage, parsing and
processing upto 1000/per second.
the cpu usage is below 60%.



Re: performance input

2007-11-03 Thread BJ Freeman
it processes about 21,000 products in about 15min.
the postgresql and ofbiz reside on the same  drive

[EMAIL PROTECTED] sent the following on 11/3/2007 2:08 PM:
 So the Ofbiz server is on the same machine?  Are the remote machines pushing
 the data directly to postgres or through the Ofbiz server?
 
 If the later is the case, that would be pretty impressive.
 
 Is this 1000 per second, minute, day?
 
 I am looking at my non-production setup machine and noting that the service
 to create an Invoice from a Shipment is taking 6+ seconds.
 
 Skip
 
 -Original Message-
 From: BJ Freeman [mailto:[EMAIL PROTECTED]
 Sent: Saturday, November 03, 2007 3:59 PM
 To: user@ofbiz.apache.org
 Subject: performance input
 
 
 have a 3ghz cpu 1 gig of ram postresql RHE4.
 under full load which is reading in 1000 of products from remote sites
 parsing the data and crud the products in ofbiz,
 besides handling Realtime orders reception, storage, parsing and
 processing upto 1000/per second.
 the cpu usage is below 60%.