Users-search-filter test report

Users-search-filter test report





PERF-130 - Getting issue details... STATUS

Overview

The purpose of this test is to define system behavior under load with user-search-filter workflow. 
During test we find that weak point of this workflow is resource usage, more specifically it's CPU usage on  DataBase side. 

Version

  • mod-users:17.2.1
  • okapi:4.2.2

Test

Test #Virtual UsersDuration (sec)
151800
281800


Results

Test 1

Response times: 

RequestsTotalResponse times (seconds)
Min50th pct75th pct95th pct99th pctMax
authn/login HTTP Request10.2930.2930.2930.2930.2930.293
GET_/Departments9310.0150.0230.0270.0580.6891.441
GET_/groups?limit=40 sortby group9310.0220.0310.0380.0870.5883.063
GET_/tags9310.0150.0220.0250.0360.0869.527
GET_/users?limit=100 offset=100 query=(active="true")9292.9054.7515.0185.4725.8839.457
GET_/users?limit=100 query=(active="true")9312.2994.7494.9615.3475.7866.700
User transaction9297.3359.6259.99610.68211.39321.193


Service CPU usage

 

Most used modules:

  • Mod-Users  - 14-15% (default usage 3%);
  • Mod-OKAPI - 12-13% (default usage 4%).



Service RAM usage

There's no visible memory usage for any of modules. 





DB CPU usage

as you may see from screenshots below, there's high CPU usage caused by (according to performance insights) slow query SELECT jsonb,id from <tenant>_mod_users_users  

Database load by wait


Database load by SQL 


According to RDS performance insights to wait is CPU and it's 3.63 seconds.

Test 2

Response times:

RequestsTotalResponse times (seconds)
Min50th pct75th pct95th pct99th pctMax
authn/login HTTP Request10.2570.2570.2570.2570.2570.257
GET_/Departments8900.0160.0340.4003.9195.6526.781
GET_/groups?limit=40 sortby group8900.0240.0530.5413.8155.2418.141
GET_/tags8900.0160.0280.0370.0820.3531.785
GET_/users?limit=100 offset=100 query=(active="true")8873.2237.2928.00510.38412.31514.151
GET_/users?limit=100 query=(active="true")8903.8087.1757.99710.39012.09613.721
User transaction8879.61515.88417.94421.01022.90326.565



Services CPU usage:



Services memory usage:


As in previous sample memory usage are not visible for relevant modules (mod-users. and okapi-b);


DB CPU usage:


DB load bu waits:



DB load by sql:


According to RDS performance insights to wait is CPU and it's 5.25 seconds.



Errors in logs:


2020-11-09 09:54:00.310,"09:54:00 ERROR PostgresClient       query with count: function supertenant_mod_users.count_estimate(unknown) does not exist - SELECT supertenant_mod_users.count_estimate('SELECT * FROM supertenant_mod_users.users WHERE (lower(f_unaccent(users.jsonb->>''active'')) LIKE lower(f_unaccent(''true''))) AND (CASE WHEN length(''2020-11-09T09:54:00.309Z'') <= 600 THEN left(users.jsonb->>''expirationDate'',600) < ''2020-11-09T09:54:00.309Z'' ELSE left(users.jsonb->>''expirationDate'',600) < left(''2020-11-09T09:54:00.309Z'',600) AND users.jsonb->>''expirationDate'' <= ''2020-11-09T09:54:00.309Z'' END)')"
2020-11-09 09:54:00.310,io.vertx.pgclient.PgException: function supertenant_mod_users.count_estimate(unknown) does not exist
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.ErrorResponse.toException(ErrorResponse.java:29) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.QueryCommandBaseCodec.handleErrorResponse(QueryCommandBaseCodec.java:57) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.decodeError(PgDecoder.java:236) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.decodeMessage(PgDecoder.java:122) [ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.channelRead(PgDecoder.java:102) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [ms.jar:?]
2020-11-09 09:54:00.310, at java.lang.Thread.run(Thread.java:834) [?:?]





2020-11-09 09:54:00.310,"09:54:00 ERROR ExpirationTool       Error executing postgres query for tenant supertenant: 'active == true AND expirationDate < 2020-11-09T09:54:00.309Z', function supertenant_mod_users.count_estimate(unknown) does not exist"
2020-11-09 09:54:00.310,io.vertx.pgclient.PgException: function supertenant_mod_users.count_estimate(unknown) does not exist
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.ErrorResponse.toException(ErrorResponse.java:29) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.QueryCommandBaseCodec.handleErrorResponse(QueryCommandBaseCodec.java:57) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.decodeError(PgDecoder.java:236) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.decodeMessage(PgDecoder.java:122) [ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.channelRead(PgDecoder.java:102) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [ms.jar:?]
2020-11-09 09:54:00.310, at java.lang.Thread.run(Thread.java:834) [?:?]




2020-11-09 09:54:00.310,09:54:00 ERROR ExpirationTool       Attempt to expire records for tenant supertenant failed: function supertenant_mod_users.count_estimate(unknown) does not exist
2020-11-09 09:54:00.310,io.vertx.pgclient.PgException: function supertenant_mod_users.count_estimate(unknown) does not exist
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.ErrorResponse.toException(ErrorResponse.java:29) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.QueryCommandBaseCodec.handleErrorResponse(QueryCommandBaseCodec.java:57) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.decodeError(PgDecoder.java:236) ~[ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.decodeMessage(PgDecoder.java:122) [ms.jar:?]
2020-11-09 09:54:00.310, at io.vertx.pgclient.impl.codec.PgDecoder.channelRead(PgDecoder.java:102) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [ms.jar:?]
2020-11-09 09:54:00.310, at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [ms.jar:?]
2020-11-09 09:54:00.310, at java.lang.Thread.run(Thread.java:834) [?:?]






Related content