[teiid-issues] [JBoss JIRA] (TEIID-3404) Teiid DatabaseAppender JPA perisist Command log consume high CPU

Kylin Soong (JIRA) issues at jboss.org
Thu Mar 26 23:36:18 EDT 2015


    [ https://issues.jboss.org/browse/TEIID-3404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053861#comment-13053861 ] 

Kylin Soong commented on TEIID-3404:
------------------------------------

>From the code [1],  DatabaseAppender does a JNDI lookup on every call, then EJB/JPA persist the log entity, probably we "wouldn't do like that". 

One question I first thought is why we need persist log to database? writing the log entries to a database seems unusual, If we have to do this, and the log entries are in great number, probably we need take performance inconsideration.  Do we need consider transaction per log or per request? I also find the default production install use the DEBUG level log, does this reasonable?

Another approach is H2, I am not sure H2 can used in production, but from thread dump trace, there are pause in H2 driver, can we use H2 in production?

I thought to enhance this issue is use JDBC/batch the insertions to replace EJB/JPA, do you think this is a feasible way ?

[1] https://github.com/teiid/teiid-extensions/blob/master/database-logging-appender/src/main/java/org/teiid/logger/DatabaseAppender.java

> Teiid DatabaseAppender JPA perisist Command log consume high CPU
> ----------------------------------------------------------------
>
>                 Key: TEIID-3404
>                 URL: https://issues.jboss.org/browse/TEIID-3404
>             Project: Teiid
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 8.7.1
>         Environment: * DV 6.1
> * dynamicvdb-datafederation quickstart
>            Reporter: Kylin Soong
>            Assignee: Kylin Soong
>
> I have 4 - 5 concurrent client query to Portfolio VDB, this cause  log  DatabaseAppender JPA perisist Command log thread consume high CPU. In my test, one log threads always swallow high CPU, if the concurrent client query more than 10, it swallow 100% cpu.
> [1] have detailed reproduce steps, including thread dumps.
> [1] https://github.com/kylinsoong/teiid-samples/tree/master/command-logging-highcpu



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the teiid-issues mailing list