ipfs / ipfs/kubo

Make ipfs add slower or a seperate process

Open
#4,828 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

So the issue I'm having relates running a small video site. The problem comes when I want to add a video. The daemon runs full tilt and interupts the ability to serve content to the gateway and others.

So the issue is I want to slow down the addition of the file. There is no rush. If I cgroup the `ipfs add` so that it can only run at 80% cpu it does nothing because it is the `ipfs daemon` that actually does the processing.

We need some kind of way to tell it we want a file added but we are in no rush. Slowing it down even a little may have it running in 95% speed but leave a considerable remander for what little else has to be done for serving data.

So possible solutions are:
1. Tune down the addition code universally
2. Seperate the process or execute the child process in a way that will be labeled so it can be reniced or cgrouped by the user
3. Give us a configuration option for a slower add
4. Add a command line option to `ipfs add` for a slower add
5. Automatically renice the child process within the code
6. Move high cpu processing to the actual `ipfs add` call itself so it can be niced and cgrouped

In my opinion nice does a lot less than I think the developers intended so I don't think you can just nice the child process and expect it to work. From my experience it seems that coding something to be less agressive so that you have a better behaving process in the beginning is a lot better than renicing an out of control process. Nice really is a placebo. If there were a way for you to make the code less agressive I think that would be better because it would likely finish within 10-20% time and play better with the system.

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.