numaflow icon indicating copy to clipboard operation
numaflow copied to clipboard

is stream maxBytes the total RAM memory required per stream?

Open kohlisid opened this issue 1 year ago • 1 comments

Highlighting observations in comments as I'm progressing

kohlisid avatar Aug 01 '24 21:08 kohlisid

Each stream has 117 Mb of data

Information for Stream STREAM1 created 2024-08-01 14:50:04

              Subjects: stream1.>
              Replicas: 3
               Storage: File

Options:

             Retention: WorkQueue
       Acknowledgments: true
        Discard Policy: New
      Duplicate Window: 2m0s
     Allows Msg Delete: true
          Allows Purge: true
        Allows Rollups: false

Limits:

      Maximum Messages: 20
   Maximum Per Subject: unlimited
         Maximum Bytes: 200 MiB
           Maximum Age: unlimited
  Maximum Message Size: unlimited
     Maximum Consumers: unlimited

Cluster Information:

                  Name: nats-cluster
                Leader: nats-server-1
               Replica: nats-server-2, current, seen 874ms ago
               Replica: nats-server-3, current, seen 874ms ago

State:

              Messages: 12
                 Bytes: 117 MiB
        First Sequence: 1 @ 2024-08-01 14:50:22
         Last Sequence: 12 @ 2024-08-01 14:50:22
      Active Consumers: 0
    Number of Subjects: 1

On the JS server

Each node holding 3 replicas of the stream, hence mem usage = ~ 368.641656MB As we have storage mode, all of it is placed on disk - > "storage": 368641656,

Screenshot 2024-08-01 at 2 58 09 PM

 "stats": {
      "memory": 0,
      "storage": 368641656,
      "reserved_memory": 0,
      "reserved_storage": 629145600,
      "accounts": 1,
      "ha_assets": 4,
      "api": {
        "total": 10,
        "errors": 0


      }
    },
    
    "tls_timeout": 2,
  "write_deadline": 10000000000,
  "start": "2024-08-01T21:13:59.797941Z",
  "now": "2024-08-01T21:54:25.414105Z",
  "uptime": "40m25s",
  "mem": 270761984,
  "cores": 8,
  "gomaxprocs": 8,
  "cpu": 0.9,
  "connections": 0,
  "total_connections": 0,
  "routes": 8,
  "remotes": 2,
  "leafnodes": 0,
  "in_msgs": 6727,
  "out_msgs": 6631,
  "in_bytes": 1229449690,
  "out_bytes": 307761940,
  "slow_consumers": 0,
  "subscriptions": 242,
  "http_req_stats": {
    "/varz": 49
  },

kohlisid avatar Aug 01 '24 22:08 kohlisid