Hello Team, I am using the latest version of Wirem...
# help
a
Hello Team, I am using the latest version of Wiremock which I have deployed on Kubernetes. I am using this to perform Load Tests on a particular application. I noticed that the Memory utilization does not go down once the load tests are complete. Is this an expected behaviour from Wiremock or am I missing something?
l
A lot of this depends on how you are starting wiremock and the parameters used. Could you post your configuration and startup parameters
a
Hello @Lee Turner, here's my deployment.yaml.
Copy code
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mec-cc-wiremock-cdt
  namespace: mec-carrier-connector-cdt
  labels:
    app: wiremock-custom
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mec-cc-wiremock-cdt
  template:
    metadata:
      labels:
        app: mec-cc-wiremock-cdt
    spec:
      volumes:
        - name: mec-cc-wiremock-cdt-storage
          persistentVolumeClaim:
            claimName: mec-cc-wiremock-storage
      containers:
        - name: mec-cc-wiremock-custom-cdt
          image: wiremock/wiremock:3.12.1-1
          volumeMounts:
          - name: mec-cc-wiremock-cdt-storage
            mountPath: /mnt/azure
          ports:
            - containerPort: 8080
          securityContext:
            allowPrivilegeEscalation: false
          resources:
            limits:
              cpu: 3500m
              memory: 7Gi
            requests:
              cpu: 2750m
              memory: 5Gi
          livenessProbe:
            tcpSocket:
              port: 8080
            initialDelaySeconds: 10
            timeoutSeconds: 1
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 5
          readinessProbe:
            tcpSocket:
              port: 8080
            initialDelaySeconds: 10
            timeoutSeconds: 1
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 5
please let me know if I need to change anything.
l
Do you also set any wiremock parameters as per this section here - https://wiremock.org/docs/standalone/java-jar/#command-line-options
a
Hay @Lee Turner, I just use "--root-dir" and nothing else
while creating the stubs I have also added the "persitant:true"
l
If those are the only parameters you are using and then generating high load then I would imagine it is your request log or template cache entries that are filling up. I would consider setting the following parameters:
--no-request-journal --disable-request-logging
. I would also consider setting
--max-template-cache-entries
to a lower value if the memory is still an issue. The cache helps on the performance side of things so you will need to balance the memory requirements you have over the load test requirements. It is important to note that setting the above parameters will turn off the request journal and request logging so you won't have the request data after the test. This tends not to be as important for load tests but worth noting
a
Hay @Lee Turner, Thank you 👍. I will test this out and let you know if things work out 😁
👍 1
Hay @Lee Turner, it worked 🥳. Thanks again for your suggestion. the resource utilization went down from 2GB to 230 mb.
l
Excellent. Great to hear
🙌 1