[ 
https://issues.apache.org/jira/browse/HDDS-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Doroszlai updated HDDS-2638:
-----------------------------------
    Description: 
Audit logging involves:

# Map of request parameters is collected while performing the operation.  Each 
parameter is eagerly converted to String separately.
# {{AuditMessage}} is created at the end, when result (success or failure) is 
known.  Content is eagerly formatted to a complete String in its constructor.
# {{AuditMessage}} is passed to {{AuditLogger}}, which logs it at some level, 
depending on result and possibly operation type.

Configuration that can affect whether specific messages are logged or not:
 * Can be turned off for categories read and/or write by filter defined in 
Log4J2 config.
 * Log level for {{AuditLogger}} can also be set in Log4j2 config.
 * Ozone can be configured to log specific operations at debug level instead of 
info level, but only for success.

Problems:

 * Conversion of request parameters requires smaller intermediate buffers to be 
allocated.
 * All processing is performed eagerly.  Messages that are below the configured 
level are discarded only at the very end, by the Log4j2 logger.

The goal of this task is to reduce processing and allocations.

  was:Investigate if allocations for creating formatted {{AuditMessage}} can be 
reduced.


> Reduce AuditMessage memory pressure
> -----------------------------------
>
>                 Key: HDDS-2638
>                 URL: https://issues.apache.org/jira/browse/HDDS-2638
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Attila Doroszlai
>            Priority: Major
>
> Audit logging involves:
> # Map of request parameters is collected while performing the operation.  
> Each parameter is eagerly converted to String separately.
> # {{AuditMessage}} is created at the end, when result (success or failure) is 
> known.  Content is eagerly formatted to a complete String in its constructor.
> # {{AuditMessage}} is passed to {{AuditLogger}}, which logs it at some level, 
> depending on result and possibly operation type.
> Configuration that can affect whether specific messages are logged or not:
>  * Can be turned off for categories read and/or write by filter defined in 
> Log4J2 config.
>  * Log level for {{AuditLogger}} can also be set in Log4j2 config.
>  * Ozone can be configured to log specific operations at debug level instead 
> of info level, but only for success.
> Problems:
>  * Conversion of request parameters requires smaller intermediate buffers to 
> be allocated.
>  * All processing is performed eagerly.  Messages that are below the 
> configured level are discarded only at the very end, by the Log4j2 logger.
> The goal of this task is to reduce processing and allocations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to