Swingbench modo texto
O programa Swingbench, que utilizo para teste de carga nos clientes, e em meus Treinamentos Oracle Tuning e Oracle RAC, também pode ser utilizado em moto texto, o que é muito melhor para conexões remotas, ou mesmo para não sobrecarregar mais ainda o servidor.
O programa modo texto do Swingbench é o charbench. Se executado sem nenhuma opção, ele faz o teste de carga com 15 usuários simultâneos para o servidor localhost, banco ORCL, usuário SOE, senha SOE.
Como na interface gráfica, será exibido o TPM (Transações Por Minuto) alcançado.
Para encerrar o teste, basta apertar enter.
[oracle@nerv01 ~]$ unzip -q swingbench240845.zip
[oracle@nerv01 ~]$ cd swingbench/bin/
[oracle@nerv01 bin]$ ./charbench
Author : Dominic Giles
Version : 2.4.0.845
Results will be written to results.xml.
Hit Return to Terminate Run...
Time Users TPM TPS
9:38:53 AM 15 728 16
Completed Run.
Na execução abaixo, eu alterei a quantidade de usuários simultâneos para 50.
[oracle@nerv01 bin]$ ./charbench -uc 50
Author : Dominic Giles
Version : 2.4.0.845
Results will be written to results.xml.
Hit Return to Terminate Run...
Time Users TPM TPS
9:40:21 AM 50 1804 42
Completed Run.
Agora eu altero também o intervalo mínimo e máximo entre as transações.
[oracle@nerv01 bin]$ ./charbench -uc 50 -intermin 50 -intermax 100
Author : Dominic Giles
Version : 2.4.0.845
Results will be written to results.xml.
Hit Return to Terminate Run...
Time Users TPM TPS
9:48:51 AM 50 1897 34
Completed Run.
E agora eu também defino que o teste seja executado por 10 minutos.
[oracle@nerv01 bin]$ ./charbench -uc 50 -intermin 50 -intermax 100 -rt 00:10
Author : Dominic Giles
Version : 2.4.0.845
Results will be written to results.xml.
Hit Return to Terminate Run...
Time Users TPM TPS
10:00:34 AM 0 1398 1
Completed Run.
Para verificar todas as opções disponíveis, utilize o -h.
[oracle@nerv01 bin]$ ./charbench -h
usage: parameters:
-D use value for given environment variable
-a run automatically
-be end recording statistics after. Value is in
the form hh:mm
-bs start recording statistics after. Value is in
the form hh:mm
-c specify config file
-co specify/override coordinator in configuration
file.
-com specify comment for this benchmark run (in
double quotes)
-cpuloc specify/overide location/hostname of the cpu
monitor.
-cpupass specify/overide os password of the user used
to monitor cpu.
-cpuuser specify/overide os username of the user used
to monitor cpu.
-cs override connect string in configuration file
-debug turn on debugging. Written to standard out
-debugf turn on debugging. Witten to debug.log.
-di disable transactions(s) by short name, comma
separated
-dt override driver type in configuration file
(thin, oci, ttdirect, ttclient)
-en enable transactions(s) by short name, comma
separated
-env display environment configuration
-g distributed group identifier
-h,--help print this message
-i run interactively (default)
-intermax override minimum inter transaction sleep time
(default = 0)
-intermin override minimum inter transaction sleep time
(default = 0)
-ld specify/overide the logon delay (milliseconds)
-max override maximum intra transaction think time
in configuration file
-min override minimum intra transaction think time
in configuration file
-p override password in configuration file
-r specify results file
-rr specify/overide refresh rate for charts in
secs
-rt specify/overide run time for the benchmark.
Value is in the form hh:mm
-s run silent
-u override username in configuration file
-uc override user count in configuration file.
-v display run statistics (vmstat/sar like
output), options include (comma separated no spaces).
trans|cpu|disk|dml|tpm|tps|users|resp|vresp
-vo output file for verbose output (defaults to
stdout)
[oracle@nerv01 bin]$