google / google/gvisor

Accelerate append write for cacheRemoteRevalidating gofer mount

Open
#1,792 2 comments 0 reactions 0 assignees View on GitHub
area: filesystem area: performance type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

Append write for cacheRemoteRevalidating gofer mount is a heavy operation, as it needs asking the gofer for file size firstly.

To accelerate it, we propose to leverage the non-posix behavisor to linux. According to man 2 pwrite:

```
POSIX requires that opening a file with the O_APPEND flag should have no effect on the
location at which pwrite() writes data. However, on Linux, if a file is opened with
O_APPEND, pwrite() appends data to the end of the file, regardless of the value of offset.
```

For VFS1, we can introduce an appendHandles aside already-existing readHandles and writeHandles.

But for VFS2, it seems that it's redesigned to keep only one handle for all operations.

Thoughts?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.