You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are storing the 1000 keys data as follows in valkey
"\n\x0fRM_Gf79fjU286PZ\x12\x15loadgenerator-9room17\x18\xac\x02(\xf7\xac\xdd\xc1\x062,jfAPiA5y4jBbfvd2kOAyEeT0zYPk8ccGLef5uIpGNHvD:\x0c\n\naudio/opus:\x0b\n\taudio/red:\x0b\n\tvideo/VP8:\x0c\n\nvideo/H264:\x0b\n\tvideo/VP9:\x0b\n\tvideo/AV1:\x0b\n\tvideo/rtxH\x14P\x01X\np\x14"
this is the data for 1 field. We are storing data for this like for 1000 fields corresponf has "rooms"
But when we are fetching the data of 1000 fields using HMGET command, random number of fields data get fetched , sometime 800, 500,400 then again 300 , 500 .
We tried to do batching as well but still the same problem is happening.
When we check in redis-cli for particular field it is showing :
However, data in logs are coming. Line 365: Line 12116: 2025-05-28T18:36:44.595Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014P\u0001X\np\u0014"} Line 761: Line 12116: 2025-05-28T18:36:44.595Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014P\u0001X\np\u0014"} Line 1248: Line 10773: 2025-05-28T18:35:47.627Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 1734: Line 10773: 2025-05-28T18:35:47.627Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 3470: Line 12697: 2025-05-28T18:35:24.317Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 3708: Line 12697: 2025-05-28T18:35:24.317Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 4364: Search "loadgenerator-10room15" (29 hits in 1 file of 1 searched) [Normal]
Can you please help us here what could pe the probale reason or issue
Code snippet for batching and fetching the data:
`func (s *RedisStore) ListRooms(_ context.Context, roomNames []livekit.RoomName) ([]*livekit.Room, error) {
var items []string
var err error
if roomNames == nil {
items, err = s.rc.HVals(s.ctx, RoomsKey).Result()
if err != nil && err != redis.Nil {
err = routing.RemoveIpFromError(err)
return nil, errors.Wrap(err, "could not get rooms")
}
} else {
names := livekit.IDsAsStrings(roomNames)
const batchSize = 50
//var results []interface{}
for i := 0; i < len(names); i += batchSize {
end := i + batchSize
if end > len(names) {
end = len(names)
}
batch := names[i:end]
batchResults, err := s.rc.HMGet(s.ctx, RoomsKey, batch...).Result()
if err != nil && err != redis.Nil {
logger.Infow("Debug for performance:: could not get rooms by names", "batch", batch)
err = routing.RemoveIpFromError(err)
return nil, errors.Wrap(err, "could not get rooms by names")
}
for j, r := range batchResults {
if r == nil {
logger.Infow("Debug for performance:: Nil entry in Redis for room", "room", batch[j])
} else if item, ok := r.(string); ok {
items = append(items, item)
}
}
}
}
if roomNames != nil && len(items) == 0 {
return nil, ErrRoomNotFound
}
logger.Infow("Debug for performance:: Total rooms fetched", "count", len(items))
rooms := make([]*livekit.Room, 0, len(items))
for _, item := range items {
logger.Infow("Debug for performance:: Listing room", "room", item)
room := livekit.Room{}
err := proto.Unmarshal([]byte(item), &room)
if err != nil {
logger.Infow("Failed to unmarshal room", "room_data", item, "error", err)
return nil, err
}
rooms = append(rooms, &room)
}
return rooms, nil
}
`
This issue happening in performance load only with 1000 rooms not with 1-2 room. @madolson Can you please help
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We are storing the 1000 keys data as follows in valkey
"\n\x0fRM_Gf79fjU286PZ\x12\x15loadgenerator-9room17\x18\xac\x02(\xf7\xac\xdd\xc1\x062,jfAPiA5y4jBbfvd2kOAyEeT0zYPk8ccGLef5uIpGNHvD:\x0c\n\naudio/opus:\x0b\n\taudio/red:\x0b\n\tvideo/VP8:\x0c\n\nvideo/H264:\x0b\n\tvideo/VP9:\x0b\n\tvideo/AV1:\x0b\n\tvideo/rtxH\x14P\x01X\np\x14"
this is the data for 1 field. We are storing data for this like for 1000 fields corresponf has "rooms"
But when we are fetching the data of 1000 fields using HMGET command, random number of fields data get fetched , sometime 800, 500,400 then again 300 , 500 .
We tried to do batching as well but still the same problem is happening.
When we check in redis-cli for particular field it is showing :
127.0.0.1:6379> hmget rooms loadgenerator-10room15
However, data in logs are coming.
Line 365: Line 12116: 2025-05-28T18:36:44.595Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014P\u0001X\np\u0014"} Line 761: Line 12116: 2025-05-28T18:36:44.595Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014P\u0001X\np\u0014"} Line 1248: Line 10773: 2025-05-28T18:35:47.627Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 1734: Line 10773: 2025-05-28T18:35:47.627Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 3470: Line 12697: 2025-05-28T18:35:24.317Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 3708: Line 12697: 2025-05-28T18:35:24.317Z INFO livekit service/redisstore.go:248 Debug for peformaance:: Remove ==> Listing: {"room": "\n\u000fRM_Y6sYkZgDtbBG\u0012\u0016loadgenerator-10room15\u0018\ufffd\u0002(Ү\ufffd\ufffd\u00062,QVIwztGTeNtlnSHeOkS6HFoD4v1pcifHgJ6WCeq3VgRB:\u000c\n\naudio/opus:\u000b\n\taudio/red:\u000b\n\tvideo/VP8:\u000c\n\nvideo/H264:\u000b\n\tvideo/VP9:\u000b\n\tvideo/AV1:\u000b\n\tvideo/rtxH\u0014X\np\u0014"} Line 4364: Search "loadgenerator-10room15" (29 hits in 1 file of 1 searched) [Normal]
}
`
This issue happening in performance load only with 1000 rooms not with 1-2 room.
@madolson Can you please help
Beta Was this translation helpful? Give feedback.
All reactions