skip to Main Content

I created a container for Cassandra using the command "docker run -p 9042:9042 –rm –name cassandra -d cassandra:4.0.7" and after it starts the disk usage on my windows machine goes to 100% usage

I can’t find anywhere how to limit the writes if Cassandra

2

Answers


  1. Chosen as BEST ANSWER

    I used this dicker compose final to limit cassandra:

     version: '3.7'
    services:
      cassandra:
        image: cassandra:latest
        deploy:
          resources:
            limits:
              blkio_config:
                weight: 500
                weight_device:
                  - path: /dev/sda
                    weight: 500
                throttle_read_bps_device:
                  - path: /dev/sda
                    rate: '10mb'
                throttle_write_bps_device:
                  - path: /dev/sda
                    rate: '10mb'
        volumes:
          - cassandra-data:/var/lib/cassandra
    volumes:
      cassandra-data:
    

  2. You can limit the available disk space for containers depending on the filesystem you’re using. For example, you can set a quota with the pquota option on XFS.

    Note that doing so means that whatever application you’re running in the container can impact its operation when it runs out of disk space. For Cassandra, the instance will shutdown immediately with the default disk_failure_policy: stop configuration.

    For more info, see Setting driver options per container. Cheers!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search