Server Performance
Wednesday, 23 November 2022 · 4 messages · last reply 1 Dec 2022
JB
Johannes Bauer23 Nov 2022 11:06 #
Hi all,
we have two Linux server VMs where our BaseX application is running
- Integration
- Production
The used database is about 5 GB including a fulltext index and is identical on both systems.
The production VM is more potent in all aspects (CPU, RAM, Disk IO, ...). Dispite all of that we do not get any significantly better performance in the production system.
On top of that we even have XQuery requests that sporadically take very long (> 1 minute) that would normally take only less than one second. Again these long requests only happen in the production environment.
My first assumption was that maybe it is due to additional load on the server from other sources.
But that was not the case. We have the spikes even when there is no load at all.
Has anyone similar experiences or any ideas what could be the cause for this behaviour?
Best Regards
Johannes
TM
Tamara Marnell30 Nov 2022 19:08 #
Hello Johannes,
On your production instance, have you experimented with the maximum heap size (-Xmx) and initial heap size (-Xms) options? The delays you're seeing could be caused by garbage collection pauses, either because too much memory is allocated so GC takes a long time, or because too little is allocated so GC runs often to free up more.
It could be happening only in production because your options are different between the two machines, or simply because production is being actively used by many people, so memory gets used up and needs to be cleaned out more often.
Disclaimer: I'm not a Java developer, so my understanding is 100% textbook instead of real-life observation. I personally just try a bunch of different numbers until the application works the way I want it to. If I'm completely wrong about this, someone correct me!
-Tamara
Quoted text · Johannes Bauer · 33 lines
On Wed, Nov 23, 2022 at 2:06 AM Johannes Bauer <johannes.bauer at tanner.de> wrote: > Hi all, > > we have two Linux server VMs where our BaseX application is running > > - Integration > - Production > > The used database is about 5 GB including a fulltext index and is > identical on both systems. > > The production VM is more potent in all aspects (CPU, RAM, Disk IO, ...). > Dispite all of that we do not get any significantly better performance > in the production system. > > On top of that we even have XQuery requests that sporadically take very > long (> 1 minute) that would normally take only less than one second. > Again these long requests only happen in the production environment. > > My first assumption was that maybe it is due to additional load on the > server from other sources. > But that was not the case. We have the spikes even when there is no load > at all. > > Has anyone similar experiences or any ideas what could be the cause for > this behaviour? > > Best Regards > Johannes > > >
--
Tamara Marnell
Program Manager, Systems
Orbis Cascade Alliance (orbiscascade.org <https://www.orbiscascade.org/>) Pronouns: she/her/hers
JB
Johannes Bauer1 Dec 2022 08:24 #
Hi Tamara,
thanks for the input.
The garbage collections could indeed be an issue. The database is quite large and if there are many requests at the same time the memory could be at the limit.
I will test with increased heap size and check if the situation improves.
Best Regards
Johannes
Quoted text · Tamara Marnell · 67 lines
> Hello Johannes, > > On your production instance, have you experimented with the maximum > heap size (-Xmx) and initial heap size (-Xms) options? The delays > you're seeing could be caused by garbage collection pauses, either > because too much memory is allocated so GC takes a long time, or > because too little is allocated so GC runs often to free up more. > > It could be happening only in production because your options are > different between the two machines, or simply because production is > being actively used by many people, so memory gets used up and needs > to be cleaned out more often. > > Disclaimer: I'm not a Java developer, so my understanding is 100% > textbook instead of real-life observation. I personally just try a > bunch of different numbers until the application works the way I want > it to. If I'm completely wrong about this, someone correct me! > > -Tamara > > On Wed, Nov 23, 2022 at 2:06 AM Johannes Bauer > <johannes.bauer at tanner.de> wrote: > > Hi all, > > we have two Linux server VMs where our BaseX application is running > > - Integration > - Production > > The used database is about 5 GB including a fulltext index and is > identical on both systems. > > The production VM is more potent in all aspects (CPU, RAM, Disk > IO, ...). > Dispite all of that we do not get any significantly better > performance > in the production system. > > On top of that we even have XQuery requests that sporadically take > very > long (> 1 minute) that would normally take only less than one second. > Again these long requests only happen in the production environment. > > My first assumption was that maybe it is due to additional load on > the > server from other sources. > But that was not the case. We have the spikes even when there is > no load > at all. > > Has anyone similar experiences or any ideas what could be the > cause for > this behaviour? > > Best Regards > Johannes > > > > > -- > > Tamara Marnell > Program Manager, Systems > Orbis Cascade Alliance (orbiscascade.org <https://www.orbiscascade.org/>) > Pronouns: she/her/hers
SZ
Stefan Ziegler1 Dec 2022 11:26 #
Hi Johannes
you can also try different garbage collector implementations. Have a look e.g. here https://www.baeldung.com/jvm-garbage-collectors
They behave quite differently.
And you can use VisualVM to debug the collector: https://visualvm.github.io/
regards
Stefan
Sent from Outlook for iOS<https://aka.ms/o0ukef>
Quoted text · BaseX-Talk · 41 lines
From: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> on behalf of Johannes Bauer <johannes.bauer at tanner.de> Sent: Thursday, December 1, 2022 8:24:50 AM To: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Server Performance Hi Tamara, thanks for the input. The garbage collections could indeed be an issue. The database is quite large and if there are many requests at the same time the memory could be at the limit. I will test with increased heap size and check if the situation improves. Best Regards Johannes Hello Johannes, On your production instance, have you experimented with the maximum heap size (-Xmx) and initial heap size (-Xms) options? The delays you're seeing could be caused by garbage collection pauses, either because too much memory is allocated so GC takes a long time, or because too little is allocated so GC runs often to free up more. It could be happening only in production because your options are different between the two machines, or simply because production is being actively used by many people, so memory gets used up and needs to be cleaned out more often. Disclaimer: I'm not a Java developer, so my understanding is 100% textbook instead of real-life observation. I personally just try a bunch of different numbers until the application works the way I want it to. If I'm completely wrong about this, someone correct me! -Tamara On Wed, Nov 23, 2022 at 2:06 AM Johannes Bauer <johannes.bauer at tanner.de<mailto:johannes.bauer at tanner.de>> wrote: Hi all, we have two Linux server VMs where our BaseX application is running - Integration - Production The used database is about 5 GB including a fulltext index and is identical on both systems. The production VM is more potent in all aspects (CPU, RAM, Disk IO, ...). Dispite all of that we do not get any significantly better performance in the production system. On top of that we even have XQuery requests that sporadically take very long (> 1 minute) that would normally take only less than one second. Again these long requests only happen in the production environment. My first assumption was that maybe it is due to additional load on the server from other sources. But that was not the case. We have the spikes even when there is no load at all. Has anyone similar experiences or any ideas what could be the cause for this behaviour? Best Regards Johannes -- Tamara Marnell Program Manager, Systems Orbis Cascade Alliance (orbiscascade.org<https://www.orbiscascade.org/>) Pronouns: she/her/hers
Written for BaseX 10.3, 10.4. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery