Fix FrostfsID cache #1464

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:fix/frostfsid_cache into master 2024-11-02 14:21:42 +00:00
  1. Add cache metrics
  2. Cache subject not found error as it is expected by callers error

Perf test 5 min, 600 writers, 8kb

Before:

     data_received..............: 0 B     0 B/s
     data_sent..................: 9.9 GB  33 MB/s
     frostfs_obj_put_bytes......: 9.9 GB  33 MB/s
     frostfs_obj_put_duration...: avg=148.3ms  min=9.03ms   med=134.69ms max=1.43s p(90)=241.97ms p(95)=284.08ms
     frostfs_obj_put_success....: 1206886 4020.709226/s
     iteration_duration.........: avg=149.14ms min=128.91µs med=135.52ms max=1.43s p(90)=242.89ms p(95)=285ms   
     iterations.................: 1206886 4020.709226/s
     vus........................: 600     min=600       max=600

After:

     data_received..............: 0 B     0 B/s
     data_sent..................: 19 GB   63 MB/s
     frostfs_obj_put_bytes......: 19 GB   63 MB/s
     frostfs_obj_put_duration...: avg=77.18ms min=7.62ms   med=63.38ms max=1.12s p(90)=131.28ms p(95)=173.69ms
     frostfs_obj_put_success....: 2309080 7694.787607/s
     iteration_duration.........: avg=77.92ms min=129.31µs med=64.11ms max=1.12s p(90)=132.15ms p(95)=174.53ms
     iterations.................: 2309080 7694.787607/s
     vus........................: 600     min=600       max=600

image

Found with #1462

1. Add cache metrics 2. Cache `subject not found` error as it is expected by callers error Perf test 5 min, 600 writers, 8kb Before: ``` data_received..............: 0 B 0 B/s data_sent..................: 9.9 GB 33 MB/s frostfs_obj_put_bytes......: 9.9 GB 33 MB/s frostfs_obj_put_duration...: avg=148.3ms min=9.03ms med=134.69ms max=1.43s p(90)=241.97ms p(95)=284.08ms frostfs_obj_put_success....: 1206886 4020.709226/s iteration_duration.........: avg=149.14ms min=128.91µs med=135.52ms max=1.43s p(90)=242.89ms p(95)=285ms iterations.................: 1206886 4020.709226/s vus........................: 600 min=600 max=600 ``` After: ``` data_received..............: 0 B 0 B/s data_sent..................: 19 GB 63 MB/s frostfs_obj_put_bytes......: 19 GB 63 MB/s frostfs_obj_put_duration...: avg=77.18ms min=7.62ms med=63.38ms max=1.12s p(90)=131.28ms p(95)=173.69ms frostfs_obj_put_success....: 2309080 7694.787607/s iteration_duration.........: avg=77.92ms min=129.31µs med=64.11ms max=1.12s p(90)=132.15ms p(95)=174.53ms iterations.................: 2309080 7694.787607/s vus........................: 600 min=600 max=600 ``` ![image](/attachments/94335bad-1945-4964-bb44-9a4e4df3a58e) Found with https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/1462
dstepanov-yadro force-pushed fix/frostfsid_cache from cd5f4ec0a9 to 6e8f5892bc 2024-10-30 14:48:59 +00:00 Compare
dstepanov-yadro force-pushed fix/frostfsid_cache from 6e8f5892bc to f51f3c381b 2024-10-30 14:49:57 +00:00 Compare
dstepanov-yadro reviewed 2024-10-30 14:51:32 +00:00
@ -54,0 +88,4 @@
m.subjExtCache.Add(addr, subjectExtWithError{
err: err,
})
m.subjCache.Add(addr, subjectWithError{
Author
Member

As now only subject not found error is cacheable, it is safe to update both caches

As now only `subject not found` error is cacheable, it is safe to update both caches
dstepanov-yadro force-pushed fix/frostfsid_cache from f51f3c381b to 32be596c2d 2024-10-30 14:52:38 +00:00 Compare
dstepanov-yadro requested review from storage-core-committers 2024-10-30 15:01:01 +00:00
dstepanov-yadro requested review from storage-core-developers 2024-10-30 15:01:01 +00:00
dstepanov-yadro force-pushed fix/frostfsid_cache from 32be596c2d to 2285cfc36f 2024-10-30 15:27:42 +00:00 Compare
fyrchik approved these changes 2024-10-31 06:18:23 +00:00
acid-ant approved these changes 2024-10-31 06:33:05 +00:00
fyrchik merged commit 2285cfc36f into master 2024-10-31 06:39:43 +00:00
fyrchik referenced this pull request from a commit 2024-10-31 06:39:45 +00:00
dstepanov-yadro deleted branch fix/frostfsid_cache 2024-10-31 06:56:10 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1464
No description provided.