# Update on 2023 "directory requires a lot of resources and might slow down your system" warning

**URL:** https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946
**Category:** General
**Created:** [April 14, 2024, 10:43am UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946 "2024-04-14T10:43:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bikerchris](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bikerchris/32/12679_2.png) [@bikerchris](https://forum.syncthing.net/u/bikerchris)
#### Post date: [April 14, 2024, 10:43am UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946/1 "2024-04-14T10:43:42Z")

</div>

Relates to TrueNAS Core: TrueNAS-13.0-U6.1 Syncthing Version: 1.27.2\_1 Install type: plugin

Hi all,

First of all, well done to all you mods, helping the experienced and inexperienced alike 👍

I thought I would give an update to the following thread, that I last responded to a year ago.

> [@Warning of high usage / system slow down despite small amount of files?](https://forum.syncthing.net/t/warning-of-high-usage-system-slow-down-despite-small-amount-of-files/19994):
>
> Hello all, I’ve happily been using ST for some time now, but I’ve recently started getting this warning: 2023-03-24 06:40:25: Filesystem watching (kqueue) is enabled on "Folder1" (XXXX) with a lot of files/directories, and that requires a lot of resources and might slow down your system significantly 2023-03-24 06:40:25: Filesystem watching (kqueue) is enabled on "Folder2" (XXXX) with a lot of files/directories, and that requires a lot of resources and might slow down your system significantl…

Just wish to say that I still receive this warning upon a restart of ST on the server, however there’s been no excessive CPU usage or reliability issues and it’s only applicable to the following folders:

Folder 1 - 9694 files / 1462 folders Folder 2 - 26174 files / 8066 folders

The warning does not occur on the following folders:

Folder 3 64 files / no folders Folder 4 2 files / no folders Folder 5 5 files / 1 folder Folder 6 5547 files / 946 folders.

I hope that helps someone. Of course as time goes by, this could be a moot issue as TrueNAS Core users are gently nudged to migrate to Scale.

 ![Screenshot 2024-04-14 114012](https://forum-uploads.syncthingcdn.net/original/3X/4/c/4c521a399b0d1305b0f7504076764038c3d4e04d.png)

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [April 14, 2024, 11:35am UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946/2 "2024-04-14T11:35:31Z")

</div>

IIRC the warning triggers at 10k files+dirs so this is correct as intended.

---

<div class="post-metadata">

### Author: ![mopani](https://forum.syncthing.net/user_avatar/forum.syncthing.net/mopani/32/11026_2.png) [@mopani](https://forum.syncthing.net/u/mopani)
#### Post date: [April 16, 2024, 7:42pm UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946/3 "2024-04-16T19:42:14Z")

</div>

FWIW, I have Syncthing running on XigmaNAS (FreeBSD) with close to 300k files/folders. But its got plenty of RAM and CPU, so I’ve never noticed it choking although I receive the warnings. XigmaNAS seems to be well tuned out of the box for this.

---

<div class="post-metadata">

### Author: ![bikerchris](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bikerchris/32/12679_2.png) [@bikerchris](https://forum.syncthing.net/u/bikerchris)
#### Post date: [April 20, 2024, 1:20pm UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946/4 "2024-04-20T13:20:02Z")

</div>

Yes indeed, there must have been some improvements as last year it also triggered a warning, though sometimes with only a dozen files in a folder.

---

<div class="post-metadata">

### Author: ![bikerchris](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bikerchris/32/12679_2.png) [@bikerchris](https://forum.syncthing.net/u/bikerchris)
#### Post date: [April 20, 2024, 1:20pm UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946/5 "2024-04-20T13:20:40Z")

</div>

That’s very reassuring to hear, thank you very much for letting me know. I have only a modest amount of RAM (32GB), but it seems all has always been well and good.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [April 20, 2024, 4:11pm UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946/6 "2024-04-20T16:11:48Z")

</div>

There was a bug that triggered the warning too early; it’s been fixed. But as many such things it’s just a threshold for a warning. We trigger it at 10k open file descriptors, but your system may be fine with 100k or a million, or might struggle at a thousand. Specifics differ…

---

<div class="post-metadata">

### Author: ![mopani](https://forum.syncthing.net/user_avatar/forum.syncthing.net/mopani/32/11026_2.png) [@mopani](https://forum.syncthing.net/u/mopani)
#### Post date: [April 22, 2024, 4:02pm UTC](https://forum.syncthing.net/t/update-on-2023-directory-requires-a-lot-of-resources-and-might-slow-down-your-system-warning/21946/7 "2024-04-22T16:02:49Z")

</div>

That’s more than sufficient RAM, I have 8GB. I have a couple of remote VPS FreeBSD servers handling ~130k files with only 512MB RAM.

You may have to increase file handles in FreeBSD if you receive the message `Too many files`:

```plaintext
# sysctl -a |grep files
kern.maxfiles: 113359
kern.maxfilesperproc: 102015

# sysctl kern.maxfiles=2000000
kern.maxfiles: 113359 -> 2000000

# sysctl kern.maxfilesperproc=250000
kern.maxfilesperproc: 102015 -> 250000

# service sycnthing restart

```

To make the changes apply on the next reboot:

```plaintext
# echo kern.maxfiles=2000000 >> /etc/sysctl.conf
# echo kern.maxfilesperproc=250000 >> /etc/sysctl.conf

```

In XigmaNAS (and similar possibly for TrueNAS Core), these settings will instead need to be added (or edited) in _ **System \> Advanced \> sysctl.conf** _.
