Skip to content

posixfs tries to stat the lockfile for every entry in a file listing #2745

@butonic

Description

@butonic

in AsResourceInfo we call hasLocks:

func (n *Node) hasLocks(ctx context.Context) bool {
	for _, p := range n.LockFilePaths() {
		if _, err := os.Stat(p); err == nil { // STAT !!!
			return true
		}
	}
	return false
}

this makes a stat call for every child in the dirlisting.

on a network filesystem like leilfs listing 1000 files looks like this:

Image

when always returning false instead of making the stat call:

Image

In the back, there are two pods with different load. the sfsmount process produces constant load. using an nfs ganesha mount might be better for our use case, but I ran into problems

Under heavy load the problem gets worse ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Qualification

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions