Tuning the filewalker

No problem at all! Most of my issues were that I’m not really using Golang on my day to day basis (I’m an Elixir programmer :joy: ) but in general it was a nice experience :slight_smile:

4 Likes

Really nice, thanks a lot!
What would be the syntax to set this in the docker run command?

1 Like

add -- before the option, and value after the option. All options added as an argument must follow the image name in the docker run command, i.e.

docker run -d ... storjlabs/storagenode:latest --storage2.piece-scan-on-startup=false
4 Likes

Is there a way of implementing this in docker compose such that it can be decided each time the command is run? Like
docker-compose up -d storjnode --storage2.piece-scan-on-startup=false
and
docker-compose up -d storjnode --storage2.piece-scan-on-startup=true
(I know those commands wont work)
Or would I have to use docker run?

You need to modify your docker-compose.yaml

services:
  storagenode:
...
  command:
    - "storage2.piece-scan-on-startup=true"
...

then docker-compose up -d
For the false the same - modify docker-compose.yaml and run docker-compose up -d

This way you may also be sure, in what mode did you run it - just take a look on your docker-compose.yaml file.

1 Like

dang. I was hoping I wouldnt have to change the compose file each time. Thanks!

scripts can be powerful tools, docker compose is basically just something similar, to my understanding anyways.

if it can’t do what you want it to, i’m sure you could make some sort of bash script or such to do the docker run command instead.

I have quite a few, but I was just hoping I could have my config in one place so if I modify it I don’t have to change multiple places. I’ll look into using docker run in conjunction with compose. My compose is rather intricate. My goal is to be able to manually start it without the filewalker (if my server needs to restart), then have a script or cron job restart it later so that the filewalker runs. And have the filewalker be the only difference.

You may use docker-compose run too, however, it will overwrite command from your docker-compose file and port mappings will be ignored, unless you specify --service-ports option: docker compose run | Docker Documentation

1 Like

Im diving into this and I think it will work!!! If you have multiple nodes you want to start all together, then have run filewalkers staggered, you can totally do it with this. Thank you!

1 Like

Which version is it in?

INFO	Invalid configuration file key	{"Process": "storagenode-updater", "Key": "storage2.piece-scan-on-startup"}
INFO	Invalid configuration file key	{"Process": "storagenode-updater", "Key": "storage.allocated-disk-space"}

INFO	Running on version	{"Process": "storagenode-updater", "Service": "storagenode-updater", "Version": "v1.62.3"}
INFO	Downloading versions.	{"Process": "storagenode-updater", "Server Address": "https://version.storj.io"}
INFO	Current binary version	{"Process": "storagenode-updater", "Service": "storagenode", "Version": "v1.62.3"}

````Preformatted text`

It is in 1.62.3, which is currently being rolled out.

However, those messages are from the storagenode-updater, which will always be there as it uses different configuration keys (and it is totally normal to see them in the logs)

3 Likes

Hi everyone,
I’m having trouble disabling the filewalker, my run command looks like this.

sudo docker run -d --restart unless-stopped --stop-timeout 300 
-e WALLET="***"  -e EMAIL="***"  -e ADDRESS="***" 
-e STORAGE=1700Gb
--mount type=bind,source="/mnt/hdd2/storj0/identity/storagenode",destination=/app/identity 
--mount type=bind,source="/mnt/hdd2/storj0",destination=/app/config 
--mount type=bind,source="/home/storj/databases/storj0",destination=/app/dbs 
--name storagenode0 storjlabs/storagenode:latest 
--storage2.piece-scan-on-startup=false 
--operator.wallet-features=zksync

Can anyone see any obvious problems ? Or maybe the IOWAIT is caused by something else than the filewalker.
Here’s a look at my IOWAIT when the nodes restart…

Thanks a lot !

iowait is always related to one or more storage devices being slow and thus causing cpu io to wait on it… iowait can be high without having any impact on most services on the system.

its almost always 1 storage device which creates the major part of the iowait, i run a lot of stuff on my server, and it can be very difficult at times to identify what is causing the iowait, netdata is a great help tho… especially for checking each individual device, just a pain to figure out which device is which…

the disks panel in proxmox is pretty good for seeing, which disk is which and then netdata for seeing how they are behaving and if they are causing iowait.

lately i have been isolating services to a limited number of cores, so that one service won’t choke the entire server.

iowait can also not always be avoided, it just means the disk is at 100% workload, which depending on workload can often happen.

2½ hour for filewalker is pretty good.
haven’t tried to disable the filewalker and i personally won’t for the next 3-6 months until i’m sure there isn’t some issue which might cause me more pain than the filewalker.

1 Like

This hardware only runs storj so I’m sure that the iowait is related to that. As for the storage the system runs on ssd while storj nodes have their own hdd with noting else running on it. The hard drive is an ironwolf pro 10TB.
Anyone also disabling the filewalker that can confirm that my run command is correct ?

You should see a log entry like:

INFO    piecestore:cache        Startup piece scan omitted by configuration     {"Process": "storagenode"}

in your logs. It should show up within the first few seconds (here less than 10 seconds) after a restart. That’s the easiest way to confirm that the switch works.

1 Like

not

–storage2.piece-scan-on-startup=false

only

--storage2.piece-scan-on-startup=false

two

"--"

at the beginning of the line

3 Likes

it does show that in the logs so I don’t know where all the iowait comes from…
I’ll investigate further when I have some more free time.

1 Like

It does have the two - , edited my post to make that more clear but thanks for the suggestion !

1 Like

The filewalker for the purpose of detecting used space is disabled, but garbage collection does something very similar and still runs when needed. Maybe you’re seeing GC?

5 Likes