JMeter & the JDBC Driver Using Docker - "DBCP DataSource configured without a 'password'" mssql - sql-server

This is based on the answer in JMeter & Gitlab: How to Install & SQLServer JDBC Driver?.
In short, the debug output below shows that the appropriate JAR and DLL are in the Java-path on the Docker image, yet I am seeing the following error in the JMeter output:
"DBCP DataSource configured without a 'password'" mssql
"DBCP DataSource configured without a 'user'" mssql
The image uses JMeter 5.4.2 ("latest").
The JDBC driver files I am using are:
mssql-jdbc_auth-9.4.1.x86.dll
mssql-jdbc-9.4.1.jre8.jar
So is it a compatibility issue?
I have JMeter 5.4.1 installed on my computer, and the test plan works fine using the local application.
Here is the output from the Gitlab job:
[0KRunning with gitlab-runner 13.5.0 (ece86343)
[0;m[0K on qaildk03 VFwBJtXZ
[0;msection_start:1641760700:prepare_executor
[0K[0K[36;1mPreparing the "docker" executor[0;m
[0;m[0KUsing Docker executor with image guythedocker/jmeter_mssql:latest ...
[0;m[0KPulling docker image guythedocker/jmeter_mssql:latest ...
[0;m[0KUsing docker image sha256:7ebf2689ca4b15d4053c8148055524bfaf8173b76d2d66f45d0a13ce6992b901 for guythedocker/jmeter_mssql:latest with digest guythedocker/jmeter_mssql#sha256:316e3ce3f37c174147b10ce541e66121a4d5017f597f862b64cb081fae4035b8 ...
[0;msection_end:1641760705:prepare_executor
[0Ksection_start:1641760705:prepare_script
[0K[0K[36;1mPreparing environment[0;m
[0;mRunning on runner-vfwbjtxz-project-516-concurrent-0 via qaildk03...
section_end:1641760707:prepare_script
[0Ksection_start:1641760707:get_sources
[0K[0K[36;1mGetting source from Git repository[0;m
[0;m[32;1mFetching changes with git depth set to 50...[0;m
Reinitialized existing Git repository in /builds/guyl/api-performance-test/.git/
[32;1mChecking out 89b301b5 as develop...[0;m
Removing public/
Removing testresults/
[32;1mSkipping Git submodules setup[0;m
section_end:1641760709:get_sources
[0Ksection_start:1641760709:step_script
[0K[0K[36;1mExecuting "step_script" stage of the job script[0;m
[0;m[32;1m$ ls /opt/apache-jmeter-*/lib/[0;m
etc
mssql-jdbc-9.4.1.jre8.jar <------------------
mssql-jdbc_auth-9.4.1.x86.dll <------------------
etc
[32;1m$ env[0;m
CI_PROJECT_NAMESPACE=guyl
GITLAB_USER_ID=128
CI_RUNNER_VERSION=13.5.0
FF_SKIP_NOOP_BUILD_STAGES=true
LYNX_OP_USERS=50
CI_SERVER_NAME=GitLab
CI_RUNNER_DESCRIPTION=qaildk03
GITLAB_USER_EMAIL=guyl#xxxx.com
CI_SERVER_REVISION=4469fca16f1
CI_RUNNER_EXECUTABLE_ARCH=linux/amd64
CI_REGISTRY_USER=gitlab-ci-token
CI_API_V4_URL=https://gitlab.xxxx.net/api/v4
CI_REGISTRY_PASSWORD=[MASKED]
CI_RUNNER_SHORT_TOKEN=VFwBJtXZ
CI_JOB_NAME=api test
HOSTNAME=runner-vfwbjtxz-project-516-concurrent-0
GITLAB_USER_LOGIN=guyl
OCTO_KEY=[MASKED]
CI_PROJECT_NAME=api-performance-test
CI_PIPELINE_SOURCE=schedule
CI_BUILD_REF_NAME=develop
CI_JOB_STATUS=running
MONYX_LOOPS=100
FF_SHELL_EXECUTOR_USE_LEGACY_PROCESS_KILL=false
CI_PIPELINE_ID=74075
CI_BUILD_REF_SLUG=develop
CI_COMMIT_REF_SLUG=develop
CI_SERVER=yes
CI_COMMIT_SHORT_SHA=89b301b5
FF_CMD_DISABLE_DELAYED_ERROR_LEVEL_EXPANSION=false
CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX=gitlab.xxxx.net:443/guyl/dependency_proxy/containers
PWD=/builds/guyl/api-performance-test
CI_RUNNER_TAGS=
CI_PROJECT_PATH=guyl/api-performance-test
RAMPUP=
CI_SERVER_TLS_CA_FILE=/builds/guyl/api-performance-test.tmp/CI_SERVER_TLS_CA_FILE
MOMA2_LOOPS=0
TZ=Europe/Amsterdam
FF_RESET_HELPER_IMAGE_ENTRYPOINT=true
CI_COMMIT_REF_PROTECTED=true
CI_SERVER_VERSION_MINOR=8
CI_COMMIT_SHA=89b301b5c6370b45bbd7770e1d827fa334a5300d
HOME=/root
FF_NETWORK_PER_BUILD=false
CI_DEPENDENCY_PROXY_PASSWORD=[MASKED]
CI_PROJECT_VISIBILITY=internal
CI_CONCURRENT_PROJECT_ID=0
JMETER_HOME=/opt/apache-jmeter-5.4.2 <------------------------
CI_COMMIT_MESSAGE=Update .gitlab-ci.yml file
USERS=
CI_BUILD_NAME=api test
FF_USE_DIRECT_DOWNLOAD=true
CI_PAGES_DOMAIN=gitlab-pages.xxxx.net
CI_SERVER_VERSION=13.8.6
CI_SERVER_PORT=443
CURRENT_VERSION=10.2
MOMA2_USERS=2
JMETER_DOWNLOAD_URL=https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.4.2.tgz
CI_PAGES_URL=https://guyl.gitlab-pages.xxxx.net/api-performance-test
CI_PIPELINE_IID=238
CI_REPOSITORY_URL=https://gitlab-ci-token:[MASKED]#gitlab.xxxx.net/guyl/api-performance-test.git
CI_SERVER_URL=https://gitlab.xxxx.net
GITLAB_FEATURES=
ENGINE_LOOPS=100
CI_COMMIT_DESCRIPTION=
MOMA2_RAMPUP=6
CI_JOB_STAGE=test
CI_PIPELINE_URL=https://gitlab.xxxx.net/guyl/api-performance-test/-/pipelines/74075
ENGINE_RAMPUP=9
CI_DEFAULT_BRANCH=develop
ENGINE_USERS=0
CI_BUILD_REF=89b301b5c6370b45bbd7770e1d827fa334a5300d
CI_SERVER_VERSION_PATCH=6
CI_COMMIT_TITLE=Update .gitlab-ci.yml file
CI_PROJECT_ROOT_NAMESPACE=guyl
MONYX_USERS=100
GITLAB_USER_NAME=Guy Levin
CI_PROJECT_DIR=/builds/guyl/api-performance-test
LYNX_OP_LOOPS=0
SHLVL=2
CI_RUNNER_ID=24
CI_COMMIT_TIMESTAMP=2022-01-09T20:36:44+00:00
CI_DISPOSABLE_ENVIRONMENT=true
CI_JOB_JWT=[MASKED]
CI_BUILD_ID=169407
CI_SERVER_PROTOCOL=https
LYNX_OP_RAMPUP=25
JMETER_BIN=/opt/apache-jmeter-5.4.2/bin <---------------------------------
CI_COMMIT_REF_NAME=develop
CI_SERVER_HOST=gitlab.xxxx.net
CI_JOB_URL=https://gitlab.xxxx.net/guyl/api-performance-test/-/jobs/169407
CI_JOB_TOKEN=[MASKED]
CI_CONCURRENT_ID=0
CI_BUILD_TOKEN=[MASKED]
CI_COMMIT_BRANCH=develop
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY=true
CI_RUNNER_REVISION=ece86343
CI_BUILD_BEFORE_SHA=0000000000000000000000000000000000000000
CI_DEPENDENCY_PROXY_USER=gitlab-ci-token
MONYX_RAMPUP=0
CI_PROJECT_PATH_SLUG=guyl-api-performance-test
CI_PROJECT_CONFIG_PATH=.gitlab-ci.yml
CI_NODE_TOTAL=1
CI_BUILDS_DIR=/builds
CI_JOB_ID=169407
CI_PROJECT_REPOSITORY_LANGUAGES=javascript,batchfile
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/apache-jmeter-5.4.2/bin <-------------
CI_PROJECT_ID=516
CI=true
GITLAB_CI=true
CI_JOB_IMAGE=guythedocker/jmeter_mssql:latest
CI_COMMIT_BEFORE_SHA=0000000000000000000000000000000000000000
CI_PROJECT_TITLE=api-performance-test
CI_SERVER_VERSION_MAJOR=13
CI_CONFIG_PATH=.gitlab-ci.yml
CI_BUILD_STAGE=test
CI_DEPENDENCY_PROXY_SERVER=gitlab.xxxx.net:443
CI_PROJECT_URL=https://gitlab.xxxx.net/guyl/api-performance-test
OLDPWD=/opt/apache-jmeter-5.4.2
_=/usr/bin/env
[32;1m$ echo $PATH[0;m
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/apache-jmeter-5.4.2/bin <-----------
[32;1m$ /entrypoint.sh --version[0;m
START Running Jmeter on Sun Jan 9 21:38:30 CET 2022
JVM_ARGS=-Xmn502m -Xms2008m -Xmx2008m
jmeter args=--version
jmeter ALL ARGS=-Dlog4j2.formatMsgNoLookups=true --version
Jan 09, 2022 9:38:32 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
_ ____ _ ____ _ _ _____ _ __ __ _____ _____ _____ ____
/ \ | _ \ / \ / ___| | | | ____| | | \/ | ____|_ _| ____| _ \
/ _ \ | |_) / _ \| | | |_| | _| _ | | |\/| | _| | | | _| | |_) |
/ ___ \| __/ ___ \ |___| _ | |___ | |_| | | | | |___ | | | |___| _ <
/_/ \_\_| /_/ \_\____|_| |_|_____| \___/|_| |_|_____| |_| |_____|_| \_\ 5.4.2
Copyright (c) 1999-2021 The Apache Software Foundation
END Running Jmeter on Sun Jan 9 21:38:33 CET 2022
[32;1m$ mkdir testresults[0;m
[32;1m$ mkdir testresults/monyx[0;m
[32;1m$ mkdir testresults/moma2[0;m
[32;1m$ mkdir testresults/lynx_operational[0;m
[32;1m$ mkdir testresults/engine[0;m
[32;1m$ /entrypoint.sh -n -t ./JMeter/Monyx_API/Monyx_API.jmx -l ./monyx.log -e -o ./testresults/monyx -Jthreads=$MONYX_USERS -Jrampup=$MONYX_RAMPUP -JtestCases=$MONYX_LOOPS -Jhost=qa2-payapi.xxxx.com -f # collapsed multi-line command[0;m
START Running Jmeter on Sun Jan 9 21:38:33 CET 2022
JVM_ARGS=-Xmn502m -Xms2008m -Xmx2008m
jmeter args=-n -t ./JMeter/Monyx_API/Monyx_API.jmx -l ./monyx.log -e -o ./testresults/monyx -Jthreads=100 -Jrampup=0 -JtestCases=100 -Jhost=qa2-payapi.xxxx.com -f
jmeter ALL ARGS=-Dlog4j2.formatMsgNoLookups=true -n -t ./JMeter/Monyx_API/Monyx_API.jmx -l ./monyx.log -e -o ./testresults/monyx -Jthreads=100 -Jrampup=0 -JtestCases=100 -Jhost=qa2-payapi.xxxx.com -f
Creating summariser <summary>
Created the tree successfully using ./JMeter/Monyx_API/Monyx_API.jmx
Starting standalone test # Sun Jan 09 21:38:35 CET 2022 (1641760715608)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary + 13617 in 00:01:23 = 163.8/s Avg: 577 Min: 5 Max: 49132 Err: 10000 (73.44%) Active: 100 Started: 300 Finished: 200
summary + 5932 in 00:00:30 = 197.2/s Avg: 503 Min: 256 Max: 1501 Err: 0 (0.00%) Active: 98 Started: 300 Finished: 202
summary = 19549 in 00:01:53 = 172.7/s Avg: 555 Min: 5 Max: 49132 Err: 10000 (51.15%)
summary + 489 in 00:00:31 = 15.7/s Avg: 2068 Min: 251 Max: 28079 Err: 0 (0.00%) Active: 100 Started: 400 Finished: 300
summary = 20038 in 00:02:24 = 138.7/s Avg: 591 Min: 5 Max: 49132 Err: 10000 (49.91%)
summary + 93 in 00:00:30 = 3.1/s Avg: 30500 Min: 19297 Max: 47158 Err: 0 (0.00%) Active: 100 Started: 400 Finished: 300
summary = 20131 in 00:02:54 = 115.7/s Avg: 730 Min: 5 Max: 49132 Err: 10000 (49.67%)
summary + 96 in 00:00:34 = 2.8/s Avg: 34369 Min: 22688 Max: 45334 Err: 0 (0.00%) Active: 100 Started: 400 Finished: 300
summary = 20227 in 00:03:28 = 97.3/s Avg: 889 Min: 5 Max: 49132 Err: 10000 (49.44%)
summary + 79 in 00:00:25 = 3.1/s Avg: 35523 Min: 23972 Max: 45774 Err: 0 (0.00%) Active: 100 Started: 400 Finished: 300
summary = 20306 in 00:03:53 = 87.1/s Avg: 1024 Min: 5 Max: 49132 Err: 10000 (49.25%)
summary + 81 in 00:00:33 = 2.4/s Avg: 36941 Min: 24322 Max: 46364 Err: 0 (0.00%) Active: 100 Started: 400 Finished: 300
etc
summary = 63674 in 01:35:23 = 11.1/s Avg: 8779 Min: 0 Max: 114698 Err: 18594 (29.20%)
summary + 613 in 00:00:30 = 20.4/s Avg: 4952 Min: 0 Max: 15629 Err: 204 (33.28%) Active: 100 Started: 600 Finished: 500
summary = 64287 in 01:35:53 = 11.2/s Avg: 8742 Min: 0 Max: 114698 Err: 18798 (29.24%)
DBCP DataSource configured without a 'username'
DBCP DataSource configured without a 'password'
etc
DBCP DataSource configured without a 'password'
DBCP DataSource configured without a 'username'
DBCP DataSource configured without a 'password'
DBCP DataSource configured withosummary + 377 in 00:00:30 = 12.6/s Avg: 7965 Min: 810 Max: 15971 Err: 188 (49.87%) Active: 100 Started: 1700 Finished: 1600
summary = 257193 in 02:40:23 = 26.7/s Avg: 3659 Min: 0 Max: 114698 Err: 61102 (23.76%)
summary + 388 in 00:00:30 = 12.9/s Avg: 7759 Min: 786 Max: 15878 Err: 191 (49.23%) Active: 100 Started: 1700 Finished: 1600
etc
summary + 3850 in 00:00:30 = 128.3/s Avg: 715 Min: 24 Max: 1653 Err: 3850 (100.00%) Active: 100 Started: 2700 Finished: 2600
summary = 383734 in 03:09:53 = 33.7/s Avg: 2835 Min: 0 Max: 114698 Err: 164923 (42.98%)
summary + 3864 in 00:00:30 = 128.7/s Avg: 765 Min: 44 Max: 3479 Err: 3864 (100.00%) Active: 100 Started: 2700 Finished: 2600
summary = 387598 in 03:10:23 = 33.9/s Avg: 2814 Min: 0 Max: 114698 Err: 168787 (43.55%)
summary + 2405 in 00:00:19 = 128.8/s Avg: 707 Min: 24 Max: 1436 Err: 2405 (100.00%) Active: 0 Started: 1 Finished: 1
summary = 390003 in 03:10:42 = 34.1/s Avg: 2801 Min: 0 Max: 114698 Err: 171192 (43.90%)
Tidying up ... # Mon Jan 10 00:49:18 CET 2022 (1641772158705)
... end of run
END Running Jmeter on Mon Jan 10 00:49:44 CET 2022
And here is the Dockerfile:
# inspired by https://github.com/hauptmedia/docker-jmeter and
# https://github.com/hhcordero/docker-jmeter-server/blob/master/Dockerfile
FROM alpine:3.12
ARG JMETER_VERSION="5.4.2"
ENV JMETER_HOME /opt/apache-jmeter-${JMETER_VERSION}
ENV JMETER_BIN ${JMETER_HOME}/bin
ENV JMETER_DOWNLOAD_URL https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-${JMETER_VERSION}.tgz
# Install extra packages
# Set TimeZone, See: https://github.com/gliderlabs/docker-alpine/issues/136#issuecomment-612751142
ARG TZ="Europe/Amsterdam"
ENV TZ ${TZ}
RUN apk update \
&& apk upgrade \
&& apk add ca-certificates \
&& update-ca-certificates \
&& apk add --update openjdk8-jre tzdata curl unzip bash \
&& apk add --no-cache nss \
&& rm -rf /var/cache/apk/* \
&& mkdir -p /tmp/dependencies \
&& curl -L --silent ${JMETER_DOWNLOAD_URL} > /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz \
&& mkdir -p /opt
RUN tar -xzf /tmp/dependencies/apache-jmeter-${JMETER_VERSION}.tgz -C /opt
RUN mkdir -p ${JMETER_HOME}/lib
RUN curl --ssl-no-revoke -L https://repo1.maven.org/maven2/com/microsoft/sqlserver/mssql-jdbc/9.4.1.jre8/mssql-jdbc-9.4.1.jre8.jar -o mssql-jdbc-9.4.1.jre8.jar
RUN curl --ssl-no-revoke -L https://repo1.maven.org/maven2/com/microsoft/sqlserver/mssql-jdbc_auth/9.4.1.x86/mssql-jdbc_auth-9.4.1.x86.dll -o mssql-jdbc_auth-9.4.1.x86.dll
RUN rm -rf /tmp/dependencies
COPY ./mssql-jdbc-9.4.1.jre8.jar /opt/apache-jmeter-${JMETER_VERSION}/lib/
COPY ./mssql-jdbc_auth-9.4.1.x86.dll /opt/apache-jmeter-${JMETER_VERSION}/lib/
# TODO: plugins (later)
# && unzip -oq "/tmp/dependencies/JMeterPlugins-*.zip" -d $JMETER_HOME
# Set global PATH such that "jmeter" command is found
ENV PATH $PATH:$JMETER_BIN
# Entrypoint has same signature as "jmeter" command
COPY entrypoint.sh /
WORKDIR ${JMETER_HOME}
ENTRYPOINT ["/entrypoint.sh"]
JMeter Report, showing errors:

I don't think you can use SQL Server integrated authentication from Linux machine.
In order to be able to use the approach with the Microsoft JDBC Driver and integrated authentication you need to run your builds on a Windows Runner
In case you have to use Linu you can work it around using JTDS JDBC Driver and connection string like:
jdbc:jtds:sqlserver://server_name:1433;databaseName=your-database;domain=your-domain;useNTLMv2=true;
and specify your username and password in the appropriate sections of the JDBC Connection Configuration.
Also be aware that according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article you should always be using the latest version of JMeter so consider upgrading to JMeter 5.4.3 (or whatever is the latest version which is available at JMeter Downloads page) on next available opportunity.

Related

how long takes mariadb memory to stabilize?

5.13
We made tweaks on my.cnf according to mysql tuner, and tuning primer,
but i can't really figure out when the memory will be stabilize usage of mariadb.
Here mysql tuner result -
------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 5d 8h 19m 28s (226M q [491.299 qps], 1M conn, TX: 4653G, RX: 49G)
[--] Reads / Writes: 95% / 5%
[--] Binary logging is disabled
[--] Physical Memory : 125.3G
[--] Max MySQL memory : 67.1G
[--] Other process memory: 0B
[--] Total buffers: 15.4G global + 264.8M per thread (200 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 34.3G (27.34% of installed RAM)
[OK] Maximum possible memory usage: 67.1G (53.54% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (78/226M)
[OK] Highest usage of available connections: 36% (73/200)
[OK] Aborted connections: 0.02% (447/1823123)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (4K temp sorts / 56M sorts)
[!!] Joins performed without indexes: 815533
[!!] Temporary tables created on disk: 87% (26M on disk / 30M total)
[OK] Thread cache hit rate: 99% (73 created / 1M connections)
[OK] Table cache hit rate: 99% (286M hits / 287M requests)
[OK] table_definition_cache(37000) is upper than number of tables(36204)
[OK] Open file limit used: 69% (51K/74K)
[OK] Table locks acquired immediately: 99% (170M immediate / 170M locks)
Here tuning primer -
WORKER THREADS
Current thread_cache_size = 200
Current threads_cached = 72
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 200
Current threads_connected = 1
Historic max_used_connections = 73
The number of used connections is 36% of the configured maximum.
Your max_connections variable seems to be fine.
INNODB STATUS
Current InnoDB index space = 1.46 G
Current InnoDB data space = 10.79 G
Current InnoDB buffer pool free = 24 %
Current innodb_buffer_pool_size = 15.00 G
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory
MEMORY USAGE
Max Memory Ever Allocated : 15.76 G
Configured Max Per-thread Buffers : 1.71 G
Configured Max Global Buffers : 15.14 G
Configured Max Memory Limit : 16.85 G
Physical Memory : 125.34 G
Max memory limit seem to be within acceptable norms
Here a sample of resources from top since start up until 5 days and 8 hours uptime of mariadb -
mysql 20 0 21.4g 4.1g 24576 S 4.7 3.3 0:08.90 mariadbd
mysql 20 0 21.4g 4.8g 25728 S 4.7 3.8 2:13.62 mariadbd
mysql 20 0 25.9g 8.7g 26480 S 15.0 6.9 56:52.91 mariadbd
mysql 20 0 26.2g 8.8g 26480 S 3.7 7.0 58:37.38 mariadbd
mysql 20 0 26.7g 9.3g 26480 S 10.6 7.4 66:38.53 mariadbd
mysql 20 0 26.7g 9.3g 26480 S 6.3 7.4 76:34.20 mariadbd
mysql 20 0 26.9g 9.6g 26480 S 10.0 7.7 80:31.37 mariadbd
mysql 20 0 26.9g 9.8g 26480 S 10.3 7.8 95:36.03 mariadbd
mysql 20 0 27.4g 10.2g 26480 S 8.0 8.1 96:28.67 mariadbd
mysql 20 0 27.7g 12.4g 26496 S 2.7 9.9 127:20.78 mariadbd
mysql 20 0 27.7g 15.0g 26496 S 11.3 12.0 129:35.15 mariadbd
mysql 20 0 27.7g 16.3g 26492 S 4.7 13.0 130:34.33 mariadbd
mysql 20 0 27.7g 16.3g 26492 S 22.9 13.0 135:47.21 mariadbd
mysql 20 0 27.7g 16.4g 26460 S 13.3 13.1 182:57.25 mariadbd
mysql 20 0 27.7g 16.9g 26436 S 5.0 13.5 186:18.78 mariadbd
mysql 20 0 28.2g 17.4g 26436 S 27.9 13.9 220:29.14 mariadbd
mysql 20 0 28.2g 17.4g 26436 S 10.3 13.9 240:20.25 mariadbd
mysql 20 0 28.6g 17.8g 26436 S 15.9 14.2 242:50.85 mariadbd
mysql 20 0 28.6g 17.9g 26436 S 6.6 14.2 244:48.40 mariadbd
mysql 20 0 29.0g 18.3g 26436 S 5.0 14.6 271:35.53 mariadbd
mysql 20 0 29.4g 18.5g 26480 S 11.6 14.7 327:44.08 mariadbd
mysql 20 0 29.8g 18.9g 26480 S 21.6 15.1 328:47.99 mariadbd
mysql 20 0 29.8g 18.9g 26480 S 3.7 15.1 340:27.10 mariadbd
mysql 20 0 29.8g 18.9g 26480 S 7.0 15.1 360:15.26 mariadbd
mysql 20 0 30.2g 19.6g 26460 S 3.6 15.7 397:31.67 mariadbd
mysql 20 0 31.4g 20.1g 26460 S 6.6 16.1 424:18.82 mariadbd
mysql 20 0 31.8g 20.6g 26460 S 1.7 16.5 434:33.15 mariadbd
mysql 20 0 31.8g 20.7g 26460 S 12.3 16.5 474:25.23 mariadbd
mysql 20 0 32.1g 21.1g 26444 S 9.6 16.9 501:38.46 mariadbd
mysql 20 0 32.1g 21.1g 26448 S 14.0 16.9 509:05.98
mysql 20 0 32.5g 21.6g 26448 S 10.3 17.2 524:06.26 mariadbd
mysql 20 0 33.0g 22.0g 26448 S 7.0 17.6 527:11.55 mariadbd
mysql 20 0 33.5g 22.5g 25612 S 29.9 17.9 578:12.81 mariadbd
mysql 20 0 33.5g 22.5g 25612 S 2.3 18.0 580:04.96 mariadbd
mysql 20 0 34.4g 23.4g 25044 S 17.9 18.7 647:25.39 mariadbd
mysql 20 0 35.3g 24.5g 25272 S 10.0 19.5 753:34.30 mariadbd
mysql 20 0 35.7g 24.9g 25272 S 10.0 19.9 766:17.57 mariadbd
if im trying to determine the memory usage via service status the following result -
service mariadb status
Redirecting to /bin/systemctl status mariadb.service
● mariadb.service - MariaDB 10.5.13 database server
Active: active (running) since Mon 2022-01-03 03:03:15 IST; 5 days ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 87 (limit: 820947)
Memory: 37.4G
now i just see so many indiffrent current memory usage, and for example tuning primer returns -
Configured Max Memory Limit : 16.85 G
but mysql tuner returns -
[OK] Maximum reached memory usage: 34.3G (27.34% of installed RAM)
[OK] Maximum possible memory usage: 67.1G (53.54% of installed RAM)
attaching my.cnf configurations -
performance-schema=0
#innodb_buffer_pool_size=134217728
max_allowed_packet=268435456
open_files_limit=74000
innodb_file_per_table=1
unix_socket=OFF
max_connections=200
#wait_timeout=600
#interactive_timeout=600
##
innodb_buffer_pool_size=15G
max_heap_table_size=128M
tmp_table_size=128M
#max_connections=400
table_open_cache=37000
table_definition_cache=37000
thread_cache_size=200
key_buffer_size=128M
sort_buffer_size=1M
read_buffer_size=4M
read_rnd_buffer_size=512k
join_buffer_size=3M
##
But as you can see, top command returns 24.9gb ram usage, and service status returns 37.4GB ram usage? and tuning primer saying max memory is 16.85GB, but mysql tuner says 67.1GB?
I'm completly lost in this one..
when the memory will build up until getting a stabilize memory usage?
why tuning primer, and mysql tuner memory usage is so different?from the current usage of the server itself for mariadb service?
Could anyone share his tought regards it?
Thanks!
Edit -
Hey thanks for the reply, it just keep increasing after 7 and half days -
mysql 20 0 36.2g 25.4g 25280 S 10.3 20.3 811:15.91 mariadbd
mysql 20 0 36.7g 25.8g 25296 S 5.0 20.6 840:23.93 mariadbd
mysql 20 0 37.1g 26.3g 25296 S 3.3 20.9 843:11.06 mariadbd
mysql 20 0 37.1g 26.3g 25296 S 7.6 21.0 846:27.98 mariadbd
mysql 20 0 37.1g 26.5g 25296 S 14.9 21.1 898:34.45 mariadbd
mysql 20 0 37.2g 26.5g 25272 S 13.0 21.1 933:06.45 mariadbd
mysql 20 0 37.2g 26.5g 25260 S 25.0 21.2 956:38.96 mariadbd
mysql 20 0 37.6g 26.9g 25260 S 4.3 21.5 992:54.48 mariadbd
mysql 20 0 38.0g 27.4g 25252 S 17.5 21.9 1068:31 mariadbd
mariadb.service - MariaDB 10.5.13 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: active (running) since Mon 2022-01-03 03:03:15 IST; 1 weeks 0 days ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 4105634 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 86 (limit: 820947)
Memory: 41.0G
total used free shared buff/cache available
Mem: 128350 35498 9313 2356 83538 89236
Swap: 0 0 0
systemd service status 37.4G looks consistent with the 35.7g figure from top (GiB vs GB perhaps explains the differences).
The 24.9G in top is the amount paged it. The difference to 37.4G is memory not paged in (or perhaps swapped out).
Tuning primer's 16.58G looks like it hasn't accounted all threads memory usage
mysqltuner's maximum looks like it has taken the pessimistic allocation of the maximum possible per thread allocation, which isn't occurring because your workload evidently doesn't to all the things that would get to this figure.
If your 5 days of uptime is pretty consistent to your workload, then 35/37G looks to be about the maximum used.
The thing that would make it rise from this point is if your 24% free buffer pool gets used. Your tuning primer shows 24% free which on 15G gives another 3.6G of potentially memory used on our current workload.
MySQL Tuner full from around 3h ago -
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 7d 9h 28m 52s (316M q [495.709 qps], 2M conn, TX: 6533G, RX: 69G)
[--] Reads / Writes: 95% / 5%
[--] Binary logging is disabled
[--] Physical Memory : 125.3G
[--] Max MySQL memory : 67.1G
[--] Other process memory: 0B
[--] Total buffers: 15.4G global + 264.8M per thread (200 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 34.3G (27.34% of installed RAM)
[OK] Maximum possible memory usage: 67.1G (53.54% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (111/316M)
[OK] Highest usage of available connections: 36% (73/200)
[OK] Aborted connections: 0.02% (605/2516029)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (6K temp sorts / 78M sorts)
[!!] Joins performed without indexes: 1135010
[!!] Temporary tables created on disk: 87% (36M on disk / 41M total)
[OK] Thread cache hit rate: 99% (73 created / 2M connections)
[OK] Table cache hit rate: 99% (398M hits / 400M requests)
[OK] table_definition_cache(37000) is upper than number of tables(36425)
[OK] Open file limit used: 69% (51K/74K)
[OK] Table locks acquired immediately: 99% (242M immediate / 242M locks)
-------- Performance schema ------------------------------------------------------------------------
[--] Performance schema is disabled.
[--] Memory used by P_S: 0B
[--] Sys schema isn't installed.
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is enabled.
[--] Thread Pool Size: 36 thread(s).
[--] Using default value is good enough for your version (10.5.13-MariaDB)
-------- MyISAM Metrics ----------------------------------------------------------------------------
[OK] Key buffer used: 99.7% (127.6M used / 128.0M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/1.3G
[OK] Read Key buffer hit rate: 99.9% (3B cached / 1M reads)
[!!] Write Key buffer hit rate: 43.1% (31M cached / 13M writes)
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 15.0G/12.2G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (0.625 %): 96.0M * 1/15.0G should be equal to 25%
[--] Number of InnoDB Buffer Pool Chunk : 120 for 1 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.99% (7707381322 hits/ 7708055862 total)
[!!] InnoDB Write Log efficiency: 335.3% (2710443 hits/ 808371 total)
[OK] InnoDB log waits: 0.00% (0 waits / 3518814 writes)
-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/896.0K
[OK] Aria pagecache hit rate: 97.8% (1B cached / 30M reads)
-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.
-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.
-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.
-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: MIXED
[--] XA support enabled: ON
[--] Semi synchronous replication Master: OFF
[--] Semi synchronous replication Slave: OFF
[--] This is a standalone server
Heres tops -
top - 17:06:15 up 67 days, 14:15, 1 user, load average: 2.88, 2.79, 2.77
Tasks: 560 total, 3 running, 557 sleeping, 0 stopped, 0 zombie
%Cpu(s): 4.0 us, 0.6 sy, 0.1 ni, 95.3 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
MiB Mem : 128350.7 total, 7895.4 free, 35970.4 used, 84484.8 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 89024.2 avail Mem
nothing except mariadb using alot of memory, some LSPHP proccesses spawn and go as for php requests to sites hosted within the server but they using memory only for proccesing the requests and then releasing it..
but overall cpu average is around 3-12% cpu usage, so server not under heavy load.
Server specs -
Intel xeon w-2295
software raid 1 with 2 NVMEs hard drives
OS - Cloudlinux 8.5 (based of almalinux 8.5 + redhat)
server using cPanel with mariadb 10.5.3 of cPanel.
128GB ram ecc memory
SELECT COUNT() FROM information_schema.tables;
COUNT()
94
Proccess list -
Show MySQL Processes
Id User Host db Command Time State Info Progress
root localhost NULL Query 0 starting SHOW PROCESSLIST 0.000
sometimes you see around 4-14 proccessess in the proccess lists.
Variable_name
Value
alter_algorithm
DEFAULT
analyze_sample_percentage
100.000000
aria_block_size
8192
aria_checkpoint_interval
30
aria_checkpoint_log_activity
1048576
aria_encrypt_tables
OFF
aria_force_start_after_recovery_failures
0
aria_group_commit
none
aria_group_commit_interval
0
aria_log_file_size
1073741824
aria_log_purge_type
immediate
aria_max_sort_file_size
9223372036853727232
aria_page_checksum
ON
aria_pagecache_age_threshold
300
aria_pagecache_buffer_size
134217728
aria_pagecache_division_limit
100
aria_pagecache_file_hash_size
512
aria_recover_options
BACKUP,QUICK
aria_repair_threads
1
aria_sort_buffer_size
268434432
aria_stats_method
nulls_unequal
aria_sync_log_dir
NEWFILE
aria_used_for_temp_tables
ON
auto_increment_increment
1
auto_increment_offset
1
autocommit
ON
automatic_sp_privileges
ON
back_log
90
basedir
/usr/
big_tables
OFF
bind_address
binlog_annotate_row_events
ON
binlog_cache_size
32768
binlog_checksum
CRC32
binlog_commit_wait_count
0
binlog_commit_wait_usec
100000
binlog_direct_non_transactional_updates
OFF
binlog_file_cache_size
16384
binlog_format
MIXED
binlog_optimize_thread_scheduling
ON
binlog_row_image
FULL
binlog_row_metadata
NO_LOG
binlog_stmt_cache_size
32768
bulk_insert_buffer_size
8388608
character_set_client
latin1
character_set_connection
latin1
character_set_database
latin1
character_set_filesystem
binary
character_set_results
latin1
character_set_server
latin1
character_set_system
utf8
character_sets_dir
/usr/share/mysql/charsets/
check_constraint_checks
ON
collation_connection
latin1_swedish_ci
collation_database
latin1_swedish_ci
collation_server
latin1_swedish_ci
column_compression_threshold
100
column_compression_zlib_level
6
column_compression_zlib_strategy
DEFAULT_STRATEGY
column_compression_zlib_wrap
OFF
completion_type
NO_CHAIN
concurrent_insert
AUTO
connect_timeout
10
core_file
OFF
datadir
/var/lib/mysql/
date_format
%Y-%m-%d
datetime_format
%Y-%m-%d %H:%i:%s
deadlock_search_depth_long
15
deadlock_search_depth_short
4
deadlock_timeout_long
50000000
deadlock_timeout_short
10000
debug_no_thread_alarm
OFF
default_password_lifetime
0
default_regex_flags
default_storage_engine
InnoDB
default_tmp_storage_engine
default_week_format
0
delay_key_write
ON
delayed_insert_limit
100
delayed_insert_timeout
300
delayed_queue_size
1000
disconnect_on_expired_password
OFF
div_precision_increment
4
encrypt_binlog
OFF
encrypt_tmp_disk_tables
OFF
encrypt_tmp_files
OFF
enforce_storage_engine
eq_range_index_dive_limit
200
event_scheduler
OFF
expensive_subquery_limit
100
expire_logs_days
0
explicit_defaults_for_timestamp
OFF
extra_max_connections
1
extra_port
0
flush
OFF
flush_time
0
foreign_key_checks
ON
ft_boolean_syntax
+ -><()~*:""&|
ft_max_word_len
84
ft_min_word_len
4
Variable_name
Value
ft_query_expansion_limit
20
ft_stopword_file
(built-in)
general_log
OFF
general_log_file
servername.log
group_concat_max_len
1048576
gtid_binlog_pos
gtid_binlog_state
gtid_cleanup_batch_size
64
gtid_current_pos
gtid_domain_id
0
gtid_ignore_duplicates
OFF
gtid_pos_auto_engines
gtid_slave_pos
gtid_strict_mode
OFF
have_compress
YES
have_crypt
YES
have_dynamic_loading
YES
have_geometry
YES
have_openssl
YES
have_profiling
YES
have_query_cache
YES
have_rtree_keys
YES
have_ssl
DISABLED
have_symlink
YES
histogram_size
254
histogram_type
DOUBLE_PREC_HB
host_cache_size
328
hostname
hostname
idle_readonly_transaction_timeout
0
idle_transaction_timeout
0
idle_write_transaction_timeout
0
ignore_builtin_innodb
OFF
ignore_db_dirs
in_predicate_conversion_threshold
1000
init_connect
init_file
init_slave
innodb_adaptive_flushing
ON
innodb_adaptive_flushing_lwm
10.000000
innodb_adaptive_hash_index
OFF
innodb_adaptive_hash_index_parts
8
innodb_adaptive_max_sleep_delay
0
innodb_autoextend_increment
64
innodb_autoinc_lock_mode
1
innodb_background_scrub_data_check_interval
0
innodb_background_scrub_data_compressed
OFF
innodb_background_scrub_data_interval
0
innodb_background_scrub_data_uncompressed
OFF
innodb_buf_dump_status_frequency
0
innodb_buffer_pool_chunk_size
134217728
innodb_buffer_pool_dump_at_shutdown
ON
innodb_buffer_pool_dump_now
OFF
innodb_buffer_pool_dump_pct
25
innodb_buffer_pool_filename
ib_buffer_pool
innodb_buffer_pool_instances
1
innodb_buffer_pool_load_abort
OFF
innodb_buffer_pool_load_at_startup
ON
innodb_buffer_pool_load_now
OFF
innodb_buffer_pool_size
16106127360
innodb_change_buffer_max_size
25
innodb_change_buffering
all
innodb_checksum_algorithm
full_crc32
innodb_cmp_per_index_enabled
OFF
innodb_commit_concurrency
0
innodb_compression_algorithm
zlib
innodb_compression_default
OFF
innodb_compression_failure_threshold_pct
5
innodb_compression_level
6
innodb_compression_pad_pct_max
50
innodb_concurrency_tickets
0
innodb_data_file_path
ibdata1:12M:autoextend
innodb_data_home_dir
innodb_deadlock_detect
ON
innodb_default_encryption_key_id
1
innodb_default_row_format
dynamic
innodb_defragment
OFF
innodb_defragment_fill_factor
0.900000
innodb_defragment_fill_factor_n_recs
20
innodb_defragment_frequency
40
innodb_defragment_n_pages
7
innodb_defragment_stats_accuracy
0
innodb_disable_sort_file_cache
OFF
innodb_disallow_writes
OFF
innodb_doublewrite
ON
innodb_encrypt_log
OFF
innodb_encrypt_tables
OFF
innodb_encrypt_temporary_tables
OFF
innodb_encryption_rotate_key_age
1
innodb_encryption_rotation_iops
100
innodb_encryption_threads
0
innodb_fast_shutdown
1
innodb_fatal_semaphore_wait_threshold
600
innodb_file_format
innodb_file_per_table
ON
innodb_fill_factor
100
innodb_flush_log_at_timeout
1
innodb_flush_log_at_trx_commit
1
innodb_flush_method
fsync
innodb_flush_neighbors
1
innodb_flush_sync
ON
Variable_name
Value
innodb_flushing_avg_loops
30
innodb_force_load_corrupted
OFF
innodb_force_primary_key
OFF
innodb_force_recovery
0
innodb_ft_aux_table
innodb_ft_cache_size
8000000
innodb_ft_enable_diag_print
OFF
innodb_ft_enable_stopword
ON
innodb_ft_max_token_size
84
innodb_ft_min_token_size
3
innodb_ft_num_word_optimize
2000
innodb_ft_result_cache_limit
2000000000
innodb_ft_server_stopword_table
innodb_ft_sort_pll_degree
2
innodb_ft_total_cache_size
640000000
innodb_ft_user_stopword_table
innodb_immediate_scrub_data_uncompressed
OFF
innodb_instant_alter_column_allowed
add_drop_reorder
innodb_io_capacity
200
innodb_io_capacity_max
2000
innodb_large_prefix
innodb_lock_schedule_algorithm
fcfs
innodb_lock_wait_timeout
50
innodb_log_buffer_size
16777216
innodb_log_checksums
ON
innodb_log_compressed_pages
ON
innodb_log_file_size
100663296
innodb_log_files_in_group
1
innodb_log_group_home_dir
./
innodb_log_optimize_ddl
OFF
innodb_log_write_ahead_size
8192
innodb_lru_flush_size
32
innodb_lru_scan_depth
1536
innodb_max_dirty_pages_pct
90.000000
innodb_max_dirty_pages_pct_lwm
0.000000
innodb_max_purge_lag
0
innodb_max_purge_lag_delay
0
innodb_max_purge_lag_wait
4294967295
innodb_max_undo_log_size
10485760
innodb_monitor_disable
innodb_monitor_enable
innodb_monitor_reset
innodb_monitor_reset_all
innodb_old_blocks_pct
37
innodb_old_blocks_time
1000
innodb_online_alter_log_max_size
134217728
innodb_open_files
36885
innodb_optimize_fulltext_only
OFF
innodb_page_cleaners
1
innodb_page_size
16384
innodb_prefix_index_cluster_optimization
OFF
innodb_print_all_deadlocks
OFF
innodb_purge_batch_size
300
innodb_purge_rseg_truncate_frequency
128
innodb_purge_threads
4
innodb_random_read_ahead
OFF
innodb_read_ahead_threshold
56
innodb_read_io_threads
4
innodb_read_only
OFF
innodb_replication_delay
0
innodb_rollback_on_timeout
OFF
innodb_scrub_log
OFF
innodb_scrub_log_speed
256
innodb_sort_buffer_size
1048576
innodb_spin_wait_delay
4
innodb_stats_auto_recalc
ON
innodb_stats_include_delete_marked
OFF
innodb_stats_method
nulls_equal
innodb_stats_modified_counter
0
innodb_stats_on_metadata
OFF
innodb_stats_persistent
ON
innodb_stats_persistent_sample_pages
20
innodb_stats_traditional
ON
innodb_stats_transient_sample_pages
8
innodb_status_output
OFF
innodb_status_output_locks
OFF
innodb_strict_mode
ON
innodb_sync_array_size
1
innodb_sync_spin_loops
30
innodb_table_locks
ON
innodb_temp_data_file_path
ibtmp1:12M:autoextend
innodb_thread_concurrency
0
innodb_thread_sleep_delay
0
innodb_tmpdir
innodb_undo_directory
./
innodb_undo_log_truncate
OFF
innodb_undo_logs
128
innodb_undo_tablespaces
0
innodb_use_atomic_writes
ON
innodb_use_native_aio
ON
innodb_version
10.5.13
innodb_write_io_threads
4
interactive_timeout
28800
join_buffer_size
3145728
join_buffer_space_limit
2097152
join_cache_level
2
keep_files_on_create
OFF
key_buffer_size
134217728
key_cache_age_threshold
300
key_cache_block_size
1024
Variable_name
Value
key_cache_division_limit
100
key_cache_file_hash_size
512
key_cache_segments
0
large_files_support
ON
large_page_size
0
large_pages
OFF
lc_messages
en_US
lc_messages_dir
lc_time_names
en_US
license
GPL
local_infile
ON
lock_wait_timeout
86400
locked_in_memory
OFF
log_bin
OFF
log_bin_basename
log_bin_compress
OFF
log_bin_compress_min_len
256
log_bin_index
log_bin_trust_function_creators
OFF
log_disabled_statements
sp
log_error
/var/lib/mysql/hostname.err
log_output
FILE
log_queries_not_using_indexes
OFF
log_slave_updates
OFF
log_slow_admin_statements
ON
log_slow_disabled_statements
sp
log_slow_filter
admin,filesort,filesort_on_disk,filesort_priority_...
log_slow_rate_limit
1
log_slow_slave_statements
ON
log_slow_verbosity
log_tc_size
24576
log_warnings
2
long_query_time
10.000000
low_priority_updates
OFF
lower_case_file_system
OFF
lower_case_table_names
0
master_verify_checksum
OFF
max_allowed_packet
268435456
max_binlog_cache_size
18446744073709547520
max_binlog_size
1073741824
max_binlog_stmt_cache_size
18446744073709547520
max_connect_errors
100
max_connections
200
max_delayed_threads
20
max_digest_length
1024
max_error_count
64
max_heap_table_size
134217728
max_insert_delayed_threads
20
max_join_size
18446744073709551615
max_length_for_sort_data
1024
max_password_errors
4294967295
max_prepared_stmt_count
16382
max_recursive_iterations
4294967295
max_relay_log_size
1073741824
max_rowid_filter_size
131072
max_seeks_for_key
4294967295
max_session_mem_used
9223372036854775807
max_sort_length
1024
max_sp_recursion_depth
0
max_statement_time
0.000000
max_tmp_tables
32
max_user_connections
0
max_write_lock_count
4294967295
metadata_locks_cache_size
1024
metadata_locks_hash_instances
8
min_examined_row_limit
0
mrr_buffer_size
262144
myisam_block_size
1024
myisam_data_pointer_size
6
myisam_max_sort_file_size
9223372036853727232
myisam_mmap_size
18446744073709551615
myisam_recover_options
BACKUP,QUICK
myisam_repair_threads
1
myisam_sort_buffer_size
134216704
myisam_stats_method
NULLS_UNEQUAL
myisam_use_mmap
OFF
mysql56_temporal_format
ON
net_buffer_length
16384
net_read_timeout
30
net_retry_count
10
net_write_timeout
60
old
OFF
old_alter_table
DEFAULT
old_mode
old_passwords
OFF
open_files_limit
74000
optimizer_max_sel_arg_weight
32000
optimizer_prune_level
1
optimizer_search_depth
62
optimizer_selectivity_sampling_limit
100
optimizer_switch
index_merge=on,index_merge_union=on,index_merge_so...
optimizer_trace
enabled=off
optimizer_trace_max_mem_size
1048576
optimizer_use_condition_selectivity
4
performance_schema
OFF
performance_schema_accounts_size
-1
performance_schema_digests_size
-1
performance_schema_events_stages_history_long_size
-1
performance_schema_events_stages_history_size
-1
performance_schema_events_statements_history_long_...
-1
Variable_name
Value
performance_schema_events_statements_history_size
-1
performance_schema_events_transactions_history_lon...
-1
performance_schema_events_transactions_history_siz...
-1
performance_schema_events_waits_history_long_size
-1
performance_schema_events_waits_history_size
-1
performance_schema_hosts_size
-1
performance_schema_max_cond_classes
90
performance_schema_max_cond_instances
-1
performance_schema_max_digest_length
1024
performance_schema_max_file_classes
80
performance_schema_max_file_handles
32768
performance_schema_max_file_instances
-1
performance_schema_max_index_stat
-1
performance_schema_max_memory_classes
320
performance_schema_max_metadata_locks
-1
performance_schema_max_mutex_classes
210
performance_schema_max_mutex_instances
-1
performance_schema_max_prepared_statements_instanc...
-1
performance_schema_max_program_instances
-1
performance_schema_max_rwlock_classes
50
performance_schema_max_rwlock_instances
-1
performance_schema_max_socket_classes
10
performance_schema_max_socket_instances
-1
performance_schema_max_sql_text_length
1024
performance_schema_max_stage_classes
160
performance_schema_max_statement_classes
222
performance_schema_max_statement_stack
10
performance_schema_max_table_handles
-1
performance_schema_max_table_instances
-1
performance_schema_max_table_lock_stat
-1
performance_schema_max_thread_classes
50
performance_schema_max_thread_instances
-1
performance_schema_session_connect_attrs_size
-1
performance_schema_setup_actors_size
-1
performance_schema_setup_objects_size
-1
performance_schema_users_size
-1
pid_file
/var/lib/mysql/servername.pid
plugin_dir
/usr/lib64/mysql/plugin/
plugin_maturity
gamma
port
3306
preload_buffer_size
32768
profiling
OFF
profiling_history_size
15
progress_report_time
5
protocol_version
10
proxy_protocol_networks
query_alloc_block_size
16384
query_cache_limit
1048576
query_cache_min_res_unit
4096
query_cache_size
1048576
query_cache_strip_comments
OFF
query_cache_type
OFF
query_cache_wlock_invalidate
OFF
query_prealloc_size
24576
range_alloc_block_size
4096
read_binlog_speed_limit
0
read_buffer_size
4194304
read_only
OFF
read_rnd_buffer_size
524288
relay_log
relay_log_basename
relay_log_index
relay_log_info_file
relay-log.info
relay_log_purge
ON
relay_log_recovery
OFF
relay_log_space_limit
0
replicate_annotate_row_events
ON
replicate_do_db
replicate_do_table
replicate_events_marked_for_skip
REPLICATE
replicate_ignore_db
replicate_ignore_table
replicate_wild_do_table
replicate_wild_ignore_table
report_host
report_password
report_port
3306
report_user
require_secure_transport
OFF
rowid_merge_buff_size
8388608
rpl_semi_sync_master_enabled
OFF
rpl_semi_sync_master_timeout
10000
rpl_semi_sync_master_trace_level
32
rpl_semi_sync_master_wait_no_slave
ON
rpl_semi_sync_master_wait_point
AFTER_COMMIT
rpl_semi_sync_slave_delay_master
OFF
rpl_semi_sync_slave_enabled
OFF
rpl_semi_sync_slave_kill_conn_timeout
5
rpl_semi_sync_slave_trace_level
32
secure_auth
ON
secure_file_priv
secure_timestamp
NO
server_id
1
session_track_schema
ON
session_track_state_change
OFF
session_track_system_variables
autocommit,character_set_client,character_set_conn...
session_track_transaction_info
OFF
skip_external_locking
ON
skip_name_resolve
OFF
skip_networking
OFF
Variable_name
Value
skip_show_database
OFF
slave_compressed_protocol
OFF
slave_ddl_exec_mode
IDEMPOTENT
slave_domain_parallel_threads
0
slave_exec_mode
STRICT
slave_load_tmpdir
/tmp
slave_max_allowed_packet
1073741824
slave_net_timeout
60
slave_parallel_max_queued
131072
slave_parallel_mode
optimistic
slave_parallel_threads
0
slave_parallel_workers
0
slave_run_triggers_for_rbr
NO
slave_skip_errors
OFF
slave_sql_verify_checksum
ON
slave_transaction_retries
10
slave_transaction_retry_errors
1158,1159,1160,1161,1205,1213,1429,2013,12701
slave_transaction_retry_interval
0
slave_type_conversions
slow_launch_time
2
slow_query_log
OFF
slow_query_log_file
servername-slow.log
socket
/var/lib/mysql/mysql.sock
sort_buffer_size
1048576
sql_auto_is_null
OFF
sql_big_selects
ON
sql_buffer_result
OFF
sql_if_exists
OFF
sql_log_bin
ON
sql_log_off
OFF
sql_mode
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_...
sql_notes
ON
sql_quote_show_create
ON
sql_safe_updates
OFF
sql_select_limit
18446744073709551615
sql_slave_skip_counter
0
sql_warnings
OFF
ssl_ca
ssl_capath
ssl_cert
ssl_cipher
ssl_crl
ssl_crlpath
ssl_key
standard_compliant_cte
ON
storage_engine
InnoDB
stored_program_cache
256
strict_password_validation
ON
sync_binlog
0
sync_frm
ON
sync_master_info
10000
sync_relay_log
10000
sync_relay_log_info
10000
system_time_zone
IST
system_versioning_alter_history
ERROR
system_versioning_asof
DEFAULT
table_definition_cache
37000
table_open_cache
36885
table_open_cache_instances
1
tcp_keepalive_interval
0
tcp_keepalive_probes
0
tcp_keepalive_time
0
tcp_nodelay
ON
thread_cache_size
200
thread_handling
one-thread-per-connection
thread_pool_dedicated_listener
OFF
thread_pool_exact_stats
OFF
thread_pool_idle_timeout
60
thread_pool_max_threads
65536
thread_pool_oversubscribe
3
thread_pool_prio_kickup_timer
1000
thread_pool_priority
auto
thread_pool_size
36
thread_pool_stall_limit
500
thread_stack
299008
time_format
%H:%i:%s
time_zone
SYSTEM
tls_version
TLSv1.1,TLSv1.2,TLSv1.3
tmp_disk_table_size
18446744073709551615
tmp_memory_table_size
134217728
tmp_table_size
134217728
tmpdir
/tmp
Couldn't paste full global prams as stack limit but thats around 95% of it.
We have disabled swap in the previous my.cnf edit, as for mariadb even when there are alot of free memory within the system is still building swap until swap reached 100%(4GB of swap).

Set Command in for-loop

I'm writing a script where I put local users in an array and use them in a for loop while parsing with set to display the last command information. I'm able to parse with just the commands inside of the "do" section successfully if run in a script by itself.
#!/bin/bash
#Automation Project (Khal)
#Author: Zacquille Joseph
#Version 1.2
#Get Users on System
user=$(getent passwd {1000..60000} | cut -d: -f1 )
#Puts all Users into Array
array=($user)
for item in ${array[*]}
do
set $(last | grep -w $item | head -n 1 )
echo
echo $*
echo "Name: $1"
echo "Date: $4 $5 $6"
echo "Time: $7"
echo "Status: $7 $8 $9 ${10}"
echo
done
I expect to only have an output of
mary pts/2 X.X.X.X Wed Apr 17 15:31 - 15:36 (00:04)
Name: mary
Date: Wed Apr 17
Time: 15:31
Status: 15:31 - 15:36 (00:04)
zac pts/0 X.X.X.X Tue Apr 30 14:10 still logged in
Name: zac
Date: Tue Apr 30
Time: 14:10
Status: 14:10 still logged in
instead I'm getting that combined with this:
BASH=/bin/bash
BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="./cst1.sh")
BASH_VERSINFO=([0]="4" [1]="4" [2]="19" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='4.4.19(1)-release'
DIRSTACK=()
EUID=1004
GROUPS=()
.....
FYI:
last | grep -w zac | head -n 1
Will return this:
zac pts/0 X.X.X.X Tue Apr 30 14:10 still logged in
Running this:
set $(last | head -n 10 | tail -n 1)
echo
echo $*
echo "Name: $1"
echo "Date: $4 $5 $6"
echo "Time: $7"
echo "Status: $7 $8 $9 ${10}"
echo
will return:
ubuntu pts/4 X.X.X.X Thu Apr 18 22:47 - 01:01 (02:13)
Name: ubuntu
Date: Thu Apr 18
Time: 22:47
Status: 22:47 - 01:01 (02:13)
try using another array instead of set command, eg :
arr2=($(last | grep -w $item | head -n 1 ))
echo
echo $*
echo "Name: ${arr2[0]} "
echo "Date: ${arr2[3]} ${arr2[4]} ${arr2[5]} "
echo "Time: ${arr2[6]}"
echo "Status: ${arr2[6]} ${arr2[7]} ${arr2[8]} ${arr2[9]}"
echo
SOLVED IT! One of the users never logged on but was created. For the purpose of my script all the users have to logon. Ideally i just replaced $item with each user and running the script (luckily we don't have to much users), then found that one specific user who never logged on gave that large output.

In BAT file, how do I start jmeter then wait for it to finish?

I'm using window bat file to start JMeter in command line mode, running a test, and print some results. My bat file isn't waiting for jmeter to finish so it's printing empty results. Is there any way to wait for JMeter to finish first?
My bat file:
#echo off
setlocal
set "CURRENT_DIR=%cd%"
if not "%JMETER_HOME%" == "" goto gotHome
set "JMETER_HOME=%CURRENT_DIR%"
if exist "%JMETER_HOME%\bin\jmeter.bat" goto okHome
cd ..
set "JMETER_HOME=%cd%"
cd "%CURRENT_DIR%"
:gotHome
if exist "%JMETER_HOME%\bin\jmeter.bat" goto okHome
echo The JMETER_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
break>jmeter.log
SET /P "TestFile=Test File:" || SET "TestFile=MyTestFile.txt"
echo Running test %TestFile%
start /B %JMETER_HOME%/bin/jmeter -n -t GenericTest.jmx -JTestDir="%cd%" -JTestFile="%TestFile%"
echo Test Finished, Printing Result
type result.txt
:end
pause
Running file output:
Test File:
Running test MyTestFile.txt
Test Finished, Printing Result
Press any key to continue . . . Creating summariser <summary>
Created the tree successfully using ConversationTestGeneric.jmx
Starting the test # Tue Oct 23 19:32:11 PDT 2018 (1540348331395)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary + 16 in 00:00:23 = 0.7/s Avg: 56 Min: 1 Max: 322 Err: 0 (0.00%) Active: 1 Started: 2 Finished: 1
summary + 15 in 00:00:26 = 0.6/s Avg: 22 Min: 2 Max: 69 Err: 0 (0.00%) Active: 1 Started: 2 Finished: 1
summary = 31 in 00:00:49 = 0.6/s Avg: 39 Min: 1 Max: 322 Err: 0 (0.00%)
summary + 11 in 00:00:31 = 0.3/s Avg: 26 Min: 1 Max: 107 Err: 0 (0.00%) Active: 1 Started: 2 Finished: 1
summary = 42 in 00:01:20 = 0.5/s Avg: 36 Min: 1 Max: 322 Err: 0 (0.00%)
summary + 28 in 00:00:41 = 0.7/s Avg: 17 Min: 0 Max: 71 Err: 0 (0.00%) Active: 0 Started: 3 Finished: 3
summary = 70 in 00:02:01 = 0.6/s Avg: 28 Min: 0 Max: 322 Err: 0 (0.00%)
Tidying up ... # Tue Oct 23 19:34:12 PDT 2018 (1540348452863)
... end of run
C:\myDir\
How do I wait for JMeter to finish?
Use CALL instead of START so it won't create new thread.
Also there's option to add to your start command wait option using /W:
/W or /WAIT Start application and wait for it to terminate.

New PocketSphinx user: "Segmentation fault: 11" error upon following official getting started guide

I am a new PocketSphinx user. I just followed the official getting started guide
However, I begin having difficulties when I get to this step:
"To test the installation, run pocketsphinx_continuous -inmic yes and check that it recognizes words you speak into your microphone."
I've attached my terminal output that I receive when I type this command, which ultimately results in 'Segmentation fault: 11'
Any help would be greatly appreciated.
Thanks,
Nakul
nakul : ~ 101 $ pocketsphinx_continuous -inmic yes
INFO: pocketsphinx.c(152): Parsed model-specific feature parameters from /usr/local/share/pocketsphinx/model/en-us/en-us/feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn live batch
-cmninit 40,3,-1 41.00,-5.29,-0.12,5.09,2.48,-4.07,-1.37,-1.78,-5.08,-2.05,-6.45,-1.42,1.17
-compallsen no no
-debug 0
-dict /usr/local/share/pocketsphinx/model/en-us/cmudict-en-us.dict
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm /usr/local/share/pocketsphinx/model/en-us/en-us
-input_endian little little
-jsgf
-keyphrase
-kws
-kws_delay 10 10
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1 1.000000e+00
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 22
-lm /usr/local/share/pocketsphinx/model/en-us/en-us.lm.bin
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.300000e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec 0-12/13-25/26-38
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 20 20
-vad_startspeech 10 10
-vad_threshold 2.0 2.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02
INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='batch', VARNORM='no', AGC='none'
INFO: acmod.c(162): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(149): Reading HMM transition probability matrices: /usr/local/share/pocketsphinx/model/en-us/en-us/transition_matrices
INFO: acmod.c(113): Attempting to use PTM computation module
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/means
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/variances
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(304): 222 variance values floored
INFO: ptm_mgau.c(476): Loading senones from dump file /usr/local/share/pocketsphinx/model/en-us/en-us/sendump
INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(563): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(838): Maximum top-N: 4
INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
INFO: dict.c(320): Allocating 138824 * 32 bytes (4338 KiB) for word entries
INFO: dict.c(333): Reading main dictionary: /usr/local/share/pocketsphinx/model/en-us/cmudict-en-us.dict
INFO: dict.c(213): Dictionary size 134723, allocated 1016 KiB for strings, 1679 KiB for phones
INFO: dict.c(336): 134723 words read
INFO: dict.c(358): Reading filler dictionary: /usr/local/share/pocketsphinx/model/en-us/en-us/noisedict
INFO: dict.c(213): Dictionary size 134728, allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(361): 5 words read
INFO: dict2pid.c(396): Building PID tables for dictionary
INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
INFO: dict2pid.c(132): Allocated 42672 bytes (41 KiB) for word-final triphones
INFO: dict2pid.c(196): Allocated 42672 bytes (41 KiB) for single-phone word triphones
INFO: ngram_model_trie.c(354): Trying to read LM in trie binary format
INFO: ngram_search_fwdtree.c(74): Initializing search tree
INFO: ngram_search_fwdtree.c(101): 791 unique initial diphones
INFO: ngram_search_fwdtree.c(186): Creating search channels
INFO: ngram_search_fwdtree.c(323): Max nonroot chan increased to 152609
INFO: ngram_search_fwdtree.c(333): Created 723 root, 152481 non-root channels, 53 single-phone words
INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
INFO: continuous.c(307): pocketsphinx_continuous COMPILED ON: Sep 6 2018, AT: 19:28:29
INFO: continuous.c(252): Ready....
Segmentation fault: 11
nakul : ~ 102 $ defaults write com.apple.finder AppleShowAllFiles YES.

zsh process file script

I'm attempting to have this process a number of files but I don't want it in a look so I don't have to monitor it.
#!/usr/local/bin/zsh
X=${1-20}
for (( N=1; N<=X; N++ )); do
for p in *.xml; do
curl -X POST -H "Content-Type:application/xml" -d "#${p}" "https://url /postAPI" > "post_${p}"
sleep 1
done
done
When doing ./work.sh 5 this loops forever!
What's causing infinate loop?
Edit Based on a comment below
/tmp/tmp.KeFYeM9Z % ls -l
total 4
-rwxr-xr-x 1 naes wheel 218 Nov 20 14:42 work.sh
#!/usr/local/bin/zsh
X=${1-20}
for (( N=1; N<=X; N++ )); do
for p in /tmp/tmp.u6RnKaJ3/*.xml; do
curl -X POST -H "Content-Type:application/xml" -d "#${p}" "https://url /postAPI"
sleep 1
done
done
This still continues the infinite loop
This doesn't:
% cat work1.sh
#!/usr/local/bin/zsh
X=${1-20}
for (( N=1; N<=X; N++ )); do
date
sleep 1
done
% ./work1.sh 5
Thu Nov 20 15:22:27 PST 2014
Thu Nov 20 15:22:28 PST 2014
Thu Nov 20 15:22:29 PST 2014
Thu Nov 20 15:22:30 PST 2014
Thu Nov 20 15:22:31 PST 2014
What in my loop causes the infinite?
You are writing to the same directory you are reading from. So while reading the xml files you are writing xml files making it essentially loop forever. Although it's not really an infinite loop, it's a very large one.
Let's say you have 10 files, in that case you'll have this result:
N=1: |p| = 100
N=2: |p| = 200
N=3: |p| = 400
N=4: |p| = 800
N=5: |p| = 1600
So... it groes quite fast.
This should do the trick:
#!/usr/local/bin/zsh
X=${1-20}
OUTPUT_DIR=/tmp/output/
mkdir -p $OUTPUT_DIR
cd /tmp/tmp.u6RnKaJ3
for (( N=1; N<=X; N++ )); do
echo "Attempt $N"
for p in *.xml; do
curl -X POST -H "Content-Type:application/xml" -d "#${p}" "https://url /postAPI" > "${OUTPUT_DIR}post_${p}"
sleep 1
done
done

Resources