Sonarqube web UI profiles management is slow with Oracle - installation

Installing SonarQube with Oracle on a virtualized environment (production), the profiles management is very slow compared to other installation with same distribution.
I will be grateful of some feedbacks about response time of this functionality when many profiles used on this architecture (Virtualized Linux + Oracle).
Tests below and a quick analysis to give some informations / case reproduction.
Distribution :
SonarQube 3.7.3 with 39 plugins (jar files in extensions/plugins/)
9 languages profiles : C#/C++/Flex/Java/JavaScript/PHP/Python/Web/XML (Problem increases with number of profiles)
clean installation (no projects analysed, profiles by default)
Scenario :
Calling profiles page (as nemo profiles page), second call reported after cache filled, only 1 user on platform
Log 'rails' in INFO in logback.xml
VM virtualized :
Linux SLES 11 (patch 2) x86 64b
DELL R815 / 16 core AMD (guaranteed for SonarQube VM : 1 core & 8 Go)
Tests on VM environment :
8093ms (View: 7219, DB: 864) : server on VM / Oracle on VM
2206ms (View: 1851, DB: 346) : server & H2 Embedded on same VM
=> Response time acceptable with H2 (CPU frequency not very high on VM), so no CPU/IO/RAM saturation. But some suspicions with Oracle about View part.
Personal tests :
2054ms (View: 542, DB: 1506) : server on Laptop Dell Vostro 3300 / MySql on NAS Qnap TS-219
808ms (View: 528, DB: 273) : server & HsqlDB on Laptop Dell Vostro 3300
=> Distant Database has no impact on View part (with MySQL in this case)
For fun & info, SonarQube works (starting and profiles consultation) on Qnap TS-219 (CPU armv5tel !!) with Java Service Wrapper Linux CPU armel v3.5.22
13762ms (View: 10877, DB: 2832) : server & H2 Embedded on NAS Qnap TS-219
13622ms (View: 10581, DB: 2997) : server & MySQL on NAS Qnap TS-219
=> Qnap TS-219 is not enough for SonarQube (CPU saturation ;-)).
With connecting JVisual in JMX remote for taking some thread dump, 75% have this stack (other are equivalent until RuntimeCache.getConstantFrom) :
java.lang.Thread.State: RUNNABLE
at java.lang.Throwable.getStackTraceElement(Native Method)
at java.lang.Throwable.getOurStackTrace(Throwable.java:591)
- locked <5512520e> (a java.lang.Exception)
at java.lang.Throwable.getStackTrace(Throwable.java:582)
at java.lang.Thread.getStackTrace(Thread.java:1479)
[...]
at org.jruby.RubyException.prepareBacktrace(RubyException.java:160)
[...]
at org.jruby.exceptions.RaiseException.<init>(RaiseException.java:141)
[...]
at org.jruby.Ruby.newNameError(Ruby.java:3243)
at org.jruby.RubyModule.const_missing(RubyModule.java:2647)
at org.jruby.RubyModule$i$1$0$const_missing.call(RubyModule$i$1$0$const_missing.gen:65535)
[...]
at rubyjit.ActiveSupport::Dependencies::ClassConstMissing#const_missing_1F94EEFD25B9D6ED4A2256A01713AC5D8AAE19F9.__file__(/[sonar-dir]/sonar-3.7.3/war/sonar-server/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/dependencies.rb:118)
at rubyjit.ActiveSupport::Dependencies::ClassConstMissing#const_missing_1F94EEFD25B9D6ED4A2256A01713AC5D8AAE19F9.__file__(/[sonar-dir]/sonar-3.7.3/war/sonar-server/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/dependencies.rb)
[...]
at org.jruby.RubyModule.fastGetConstantFromConstMissing(RubyModule.java:2974)
at org.jruby.ast.executable.RuntimeCache.getConstantFrom(RuntimeCache.java:418)
at org.jruby.ast.executable.AbstractScript.getConstantFrom0(AbstractScript.java:292)
at rubyjit.ArJdbc::Oracle#sql_literal?_35B81FE146BCEA62ED756B5BE2D767870ADF57AC.rescue_1$RUBY$SYNTHETIC__file__(/[sonar-dir]/sonar-3.7.3/war/sonar-server/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/oracle/adapter.rb)
at rubyjit.ArJdbc::Oracle#sql_literal?_35B81FE146BCEA62ED756B5BE2D767870ADF57AC.__file__(/[sonar-dir]/sonar-3.7.3/war/sonar-server/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/oracle/adapter.rb:162)
at rubyjit.ArJdbc::Oracle#sql_literal?_35B81FE146BCEA62ED756B5BE2D767870ADF57AC.__file__(/[sonar-dir]/sonar-3.7.3/war/sonar-server/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/oracle/adapter.rb)
[.......]
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
[...]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:662)
Hypothesis :
Many time to generate java exception (CPU cost not negligible) ? (or programming by exception is a desired process)
Especially with Oracle connector ? (Or the Oracle dialect used to generate request could explain these responses time when many profiles)
Perhaps I see problems where there are not ... but this response time with Oracle on this page (and more generally on profiles management) could be a little strange.
Thanks in advance for feedbacks or ideas.

The discussion has switched to the SonarQube user mailing list : http://sonar.markmail.org/thread/gbmj5dwyrrysujfo

Related

Ubuntu + Jmeter : Execution results are not showing in console while running test in Non GUI mode (Distributed Test)

I am running a distributed test from ubuntu machine using JMeter. When I am running test from master machine the results ( Active threads, Avg Resp time) details not showing in console,
tried by adding "Console status logger" Lisner. Still, it's not showing the results.
Possible reasons for that are the following:
You don't have enough results yet, see doc, properties time_threshold, num_sample_threshold
You have a connectivity issue between slaves and master, see this doc and this one. This might be due to a Firewall between those components, ensure you open required ports.

Periodic tns-12531: TNS: Cannot allocate memory

I have a problem that's been plaguing me about a year now. I have Oracle 12.1.x.x installed on my machine. After a day or two the listener stops responding and the listener.log contains a bunch of TNS-12531 messages. If I reboot, the problem goes away and I'm fine for another day or two. I'm lazy and I hate rebooting, so I decided to finally track this down, but I'm having no luck. Since the alternative is to do work that I really don't want to do, I'm going to spend all my time researching this.
Some notes:
Windows 10 Pro
64-Bit
32 GB RAM
Generally, about 20GB free when the error occurs
I have several databases and it doesn't matter which DB is running
Restarting the DB doesn't help
Restarting the listener doesn't help
Only rebooting clears the problem
When I set TRACE_LEVEL_LISTENER = 16, I don't get much more info. Trace files are not written to
I can connect to the DB if I bypass the listener (ie, set ORACLE_SID=xxx and connect without a DB identifier)
All other network interactions seem to work fine after the listener stops
lsnrctl status hangs and adds another TNS-12531 to the listener.log
I have roughly the same config at home and this does not happen
Below is an example of a listener.log file:
Fri Jul 28 14:21:47 2017
System parameter file is D:\app\user\product\12.1.0\dbhome_1\network\admin\listener.ora
Log messages written to D:\app\user\diag\tnslsnr\LJ-Quad\listener\alert\log.xml
Trace information written to D:\app\user\diag\tnslsnr\LJ-Quad\listener\trace\ora_24288_14976.trc
Trace level is currently 16
Started with pid=24288
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=LJ-Quad)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Listener completed notification to CRS on start
TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
28-JUL-2017 14:22:06 * 12531
TNS-12531: TNS:cannot allocate memory
28-JUL-2017 14:22:47 * 12531
TNS-12531: TNS:cannot allocate memory
28-JUL-2017 14:26:24 * 12531
TNS-12531: TNS:cannot allocate memory
Thanks a bunch for any help you can provide!
Issue 1
This error can occur approximately after 2048 connections have been made via the listener when running on a non-English Windows installation.
Fix for Issue 1
Create a Windows User Group named Administrators on the computer where the listener.exe resides. This can fix the issue of the listener dying.
Reference: I'll post the link for the first issue as soon as I find it again
Issue 2
This error can also occur on Windows 64-Bit systems where the Desktop Application Heap is too small.
Fix for Issue 2
Try to Increase the Desktop Application Heap Registry in windows its located in
HKLM\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows
Just as note don't add this Value by yourself, you have to depend on document.
Basically search for the registry entry and alter the third value for the key SharedSection=1024,20480,1024. This is a trial and error approach, but seems to improve listener's stability and memory issues.
Reference: TNS:cannot allocate memory - is there limit to the num databases on one box (Oracle Developer Community)

Boot Linux in Normal World

I am exploring the TrustZone (the ARM security extension) on an i.MX53 Quick Starting Board. I succeeded to make a bare-metal system : A secure world image and a normal world image. I load the two images in my ram with u-boot and I boot the secure world who initializes the monitor system and gives the hand to the normal world image.
I want to use the same system. But this time instead of using a normal world basic image, I would like to use a Linux Kernel Image. I did some configurations that I found in the i.MX53 Reference Manual and the i.MX53 Security Reference Manual when I am in the secure world. The configurations are :
Configure the CSU : CSL0-31 to 0x00FF_00FF
Configure the TZIC (interrupts) TZIC_INTSEC0-3 to 0xFFFF_FFFF, TZIC_PRIORITY0-31 to 0x1F1F_1F1F and TZIC_INTCTRL to 0x8001_0001
Configure Secure Configuration Register : NS=0 IRQ=0 FIQ=0 EA=0 FW=1 AW=1 => 0x30
When I give the hand to the linux kernel, the boot process starts, here is a part of the output :
regulator: core version 0.5
NET: Registered protocol family 16
i.MX IRAM pool: 128 KB#0xec840000
FAILED TO RELEASE IRAM PARTITION
CPU is i.MX0 Revision 0.0
Unhandled fault: external abort on non-linefetch (0x1008) at 0xec82c00c
Internal error: : 1008 [#1] PREEMPT
last sysfs file:
Modules linked in:
CPU: 0 Not tainted (2.6.35.3 #1)
PC is at mxc_cpu_lp_set+0x1c/0x16c
LR is at arch_idle+0x60/0x294
pc : [<8003a958>] lr : [<8003ab08>] psr: 60000093
sp : 80835f78 ip : 00000003 fp : 8088fb68
....
As you can notice in the output, there is a problem with the IRAM (because normally it diplays IRAM READY) and there is a data abort. After so displays related to these errors, the Linux kernel boot process stops.
Any ideas of how to solve that ? Am I missing any configuration ? Thank you
Have you seen this post on the Freescale forum?
It seems to be the exact same problem you're having. Basically, it is probably trying to access a register, at 0xec82c00c virtual address, which is configured by default to be non-accessible from the Normal world.

Directadmin server performance lower than ispconfig?

I am running a web-application on 2 servers, but get strange performance problem.
server 1:
Core i5-4770 3.40GHz with 8gig DDR3 running ISPConfig server with PHP/Mysql.
server 2:
Core i7-5930K 3.50GHz with 64gig DDR4 running directadmin with PHP/Mysql
the new server (2) is more powerful, but it get slower page results than the old server.
any suggestions how to find the problem?
I think you are not getting this issues due to Directadmin server. You will have to optimize your Apache and MySQL for the better performance. I will suggest you please enable some php cache modules on your server.
What version of PHP do you use and how it's connected to apache:
PHP:FPM
MOD-PHP
etc...
You probably whould like to use PHP:FPM from the security and performance reasons.
One more suggestion. Default my.cnf config file has no additional configuration on DA. So MySQL performance could be really bad because of that. Please add you my.cnf file here and share info how much RAM do you have. With that I could try to pump your config.

How to start automatically and run tomcat 6.0.37 version as a background process on Remote Desktop Server start up?

Currently I am running tomcat 6.0.37 version (64-bit windows) on remote desktop server(OS-Windows2008/64-bit), please help me to find answers for the following questions.
QUESTIONS
Q1) How can I run tomcat 6.0.37 version(64-bit windows) as a background process, after closing the tomcat server command prompt window?
(Note : "Tomcat windows service Installer" is not applicable for my scenario.)
Q2) How to start Tomcat 6.0.37 version(64-bit windows) automatically when remote desktop server(OS-Windows2008/64-bit) starts up and also when remote desktop server(OS-Windows2008/64-bit) gets restarted?
Please help me regarding the above questions with step-by-step procedure and some useful information regarding above questions.
Thanks,
Ashwini
The short version is you can't. The problems you are describing are exactly the type of problems running as a service is meant to solve.
I can't think of any valid reason why a web application couldn't run as a service. I'd challenge the supplier of your application as to why they are making such a claim.
Meanwhile, I'd run Tomcat as a service anyway. If the app needs access to network shares then you'll need to run the service as a domain user with access to those shares and make sure you specify them using the full UNC path rather than mapped drives.
I found the Solution on "How to start automatically and run tomcat 6.0.37 version as a background process on Remote Desktop Server start up?"
Step 1: In Environment Variables, set variable name and variable value as
CATALINA_HOME and C:\Tomcat6
Step 2: Environment Variables, set variable name and variable value as
CATALINA_OPTS and -server -Djava.awt.headless=true -Xms384M -Xmx1536M -XX:MaxPermSize=5750M(according to usage of your RAM size)
Step 3: Once installed tomcat service installer by setting the username = xyz, password= xyz and role=xyz-gui,manager-gui.
Then, in right corner of your desktop screen will get a Tomcat server symbol to start and stop the service. Right click on the icon, choose configure---->Java tab and enter those according to your system RAM.
In Java Options text box:
-Djava.awt.headless=true
-Xms1536M
-Xmx3072M
-XX:MaxPermSize=5750m(according to ur RAM size)
And set the values of:
Initial Memory Pool = 64MB
Maximum memory Pool = 5750(usage of RAM Size)
Thread Stack Size = 256MB
These steps are working perfectly for me. Tomcat service is running successfully without any problems.
Thanks,
Ashwini

Resources