Performance improvements #1080
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1080
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/improve_ape_perf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Head
object beforeGet
orHead
. Only basic checks will be performed. Extended (object-dependent) check will be performed on result.8b897c8b3b
to2f29975ef8
2f29975ef8
tof9643ce94e
@ -14,6 +15,14 @@ import (
nativeschema "git.frostfs.info/TrueCloudLab/policy-engine/schema/native"
)
var requestPool = &sync.Pool{
Great 👍
@ -80,6 +92,7 @@ func (c *checkerImpl) CheckAPE(ctx context.Context, prm Prm) error {
if err != nil {
return fmt.Errorf("failed to create ape request: %w", err)
}
defer requestPool.Put(r)
I think it is a good practice to empty it before put
*r = request{}
, otherwise we can forget adding some new field if initialization is done in multiple places.Regarding
sync.Pool
: I am not opposed to the idea, but 1MB/s improvement can be from 5 to 6 or from 105 to 106 -- and these are completely different. Could you add relative improvement number?025c2408ed
tof5c5a51668
256 -> 257 MB/s :)
316b965f33
to21b3b4ba4f
@ -96,0 +110,4 @@
func returnToPool(r *request) {
r.operation = ""
r.properties = nil
r.resource.name = ""
resource
is always non-nil, why is it a pointer in therequest
structure?*r.resource = resource{}
(and ifresource
is not a pointer, the whole function will be*r = request{}
.The benefit of my approach is that it will remain unchanged after adding new items
Ok, replaced pointer with value.
21b3b4ba4f
to4cae9a782a
4cae9a782a
to2ad156387c
2ad156387c
toe7203ae8cd
Some APE performance improvementsto Performance improvementse7203ae8cd
to76398c06b0