cpuLoadPercent clarification

I’m looking through PhotoStructure’s config to learn more about it before installing it.

I’d like to install it on a VPS. The VPS has 16 GB RAM and three cores but only has 100% dedicated CPU, not 300%, meaning I should try to keep sustained CPU usage below ~33% overall (spikes are OK but running all three cores at 100% constantly will get me flagged for high CPU usage by the provider).

I see that PhotoStructure has a cpuLoadPercent setting:

# +––––––––––––––––––+
# |  cpuLoadPercent  |
# +––––––––––––––––––+
# PhotoStructure runs many things in parallel during library synchronization.
# The maximum number of concurrent file imports that PhotoStructure will
# schedule at a time will be the number of CPUs that this system has
# multiplied by this percent. A higher value here will allow PhotoStructure to
# run more tasks in parallel, but may impact your system's responsiveness. 75%
# should be a reasonable balance between keeping your system responsive and
# importing your library quickly. Setting this value to 0 will still allow 1
# task to run concurrently. System memory will also be taken into account to
# try to prevent swapping.
# Min value: 0
# Max value: 200

Would setting this to 33 would do what I want?

Based on the comment, it sounds like this actually controls the total number of parallel tasks executed, and doesn’t actually set a cap on CPU usage? For example, setting it to 25 would be no different to setting it to 30 if I have three cores? If that’s the case, wouldn’t it be clearer to express this as a number of tasks rather than a percentage?

If I’m worried about CPU usage for the initial import, I guess I could index everything on my desktop PC, then rsync everything to my VPS?

It should. You can just set it to 0 or 1, and PhotoStructure will only process one file at a time.

1 Like

Probably, but this approach lets the default value not change between computers (I’ve got ~5,500 CI tests that run on 4 platforms).

1 Like

This will absolutely work, and if you’ve got a beefy desktop, it’s what I’d recommend.

Make sure your volume .uuid files are in order, though. This section talks about what to be aware of:


1 Like

Thanks for the replies!

The desktop is quite old now (Core i5-6500) but I can just leave it running for as long as it takes to do the initial index.

Ok: you’ll still want to set a low cpuLoadPercent on your vps, and make sure you grok .uuid files (if that’s not set up, your vps will re-import all your files: it won’t take as long, and you won’t see any duplicates, but it will make your library database bigger).

Do I need to worry about .uuid files if I use the “automatic library organization” feature? My photos are spread out all across my hard drive at the moment. I was going to try use automatic library organization to collect everything into one single PhotoStructure directory, and then rsync just that directory to my server. I’ve got around 45 GB of photos and 260 GB free locally (and 2 TB on my VPS) so I should have enough free space for that.

Ah, no: files in your library are referenced in your database with pathnames relative to the library root, so no .uuid volumes references are in play there.

It’s only for files outside your PhotoStructure library.

1 Like