Skip to content

Commit

Permalink
Use Graviton instances on AWS to save money using ARM (#797)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Schwartz <[email protected]>
  • Loading branch information
ahus1 committed May 3, 2024
1 parent 547f745 commit 0cdaf48
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ansible/env_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Overrides for AWS EC2. Defaults located in `roles/aws_ec2/defaults/main.yml`.
cluster_size: 2
instance_type: t3.small
instance_type: t4g.small
instance_volume_size: 30

# Overrides for Keycloak Benchmark. Defaults located in `roles/benchmark/defaults/main.yml`.
Expand Down
5 changes: 3 additions & 2 deletions ansible/roles/aws_ec2/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ cluster_size: 1

cidr_ip: "{{ control_host_ip.stdout }}/32"

ami_name: RHEL-8.8.0_HVM-20230503-x86_64-54-Hourly2-GP2
# aws ec2 describe-images --owners self amazon --filters "Name=architecture,Values=arm64" "Name=virtualization-type,Values=hvm" --region eu-west-1
ami_name: RHEL-9.3.0_HVM-20231101-arm64-5-Hourly2-GP2

instance_type: t3.micro
instance_type: t4g.micro
instance_volume_size: 20
instance_device: /dev/sda1

Expand Down
4 changes: 3 additions & 1 deletion benchmark/src/main/resources/gatling.conf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ gatling {
#maxThreadLocalCharBufferSize = 200000 # Netty's default is 16k
}
ssl {
#useOpenSsl = true # if OpenSSL should be used instead of JSSE (only the latter can be debugged with -Djavax.net.debug=ssl)
# Don't use OpenSSL as it is not available on Linux ARM
# Avoids the error message: "UnsupportedOperationException: BoringSSL is enabled in your configuration, yet it's not available for your platform linux_aarch_64."
useOpenSsl = false # if OpenSSL should be used instead of JSSE (only the latter can be debugged with -Djavax.net.debug=ssl)
#useOpenSslFinalizers = false # if OpenSSL contexts should be freed with Finalizer or if using RefCounted is fine
#handshakeTimeout = 10000 # TLS handshake timeout in millis
#useInsecureTrustManager = true # Use an insecure TrustManager that trusts all server certificates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ See xref:run/running-benchmark-ansible.adoc[] for details.
[source,yaml]
----
cluster_size: 5
instance_type: t3.small
instance_type: t4g.small
instance_volume_size: 30
kcb_zip: ../benchmark/target/keycloak-benchmark-0.13-SNAPSHOT.zip
kcb_heap_size: 1G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Use the file `link:{github-files}/ansible/env_example.yml[env_example.yaml]` as
[source,yaml]
----
cluster_size: 5
instance_type: t3.small
instance_type: t4g.small
instance_volume_size: 30
----

Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_create_global_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ for (( i = 0 ; i < ${#GLOBAL_REGIONS[@]} ; i++ )) ; do
REGION=${GLOBAL_REGIONS[i]}
export AURORA_CLUSTER=${AURORA_GLOBAL_CLUSTER}-${REGION}
# Aurora Global DBs must use one of the memory optimized classes
export AURORA_INSTANCE_CLASS="db.r5.large"
export AURORA_INSTANCE_CLASS="db.r6g.large"
export AURORA_REGION=${REGION}

if [ "${REGION}" != "${PRIMARY_REGION}" ]; then
Expand Down

0 comments on commit 0cdaf48

Please sign in to comment.