[InfluxDB 1.8.5] shard data is located in memory?

As far as I know, it will not be stored on disk until the time set by Shard Group Duration, then it will accumulate 10GB per hour in memory, so if Shard Group Duration is set to 2 hours on a 16GB computer, will OOM error occur?

That’s not how it works, and you shouldn’t incur in Out Of Memory errors, not due to writing activity at least.

Here are the docs about how the engine works, to understand how the process you are worrying about works you should be interested in the following sections

The data movement from cache to disk (Snapshot) can be controlled with the following settings