2018-12-18 11:36:38 +00:00
|
|
|
module github.com/syncthing/syncthing
|
|
|
|
|
|
|
|
require (
|
2019-06-28 05:38:52 +00:00
|
|
|
github.com/AudriusButkevicius/pfilter v0.0.0-20190627213056-c55ef6137fc6
|
2019-02-12 06:58:24 +00:00
|
|
|
github.com/AudriusButkevicius/recli v0.0.5
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
|
2018-12-18 11:36:38 +00:00
|
|
|
github.com/bkaradzic/go-lz4 v0.0.0-20160924222819-7224d8d8f27e
|
|
|
|
github.com/calmh/xdr v1.1.0
|
2019-05-29 07:56:40 +00:00
|
|
|
github.com/ccding/go-stun v0.0.0-20180726100737-be486d185f3d
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/certifi/gocertifi v0.0.0-20190905060710-a5e0173ced67 // indirect
|
2018-12-18 11:36:38 +00:00
|
|
|
github.com/chmduquesne/rollinghash v0.0.0-20180912150627-a60f8e7142b5
|
|
|
|
github.com/d4l3k/messagediff v1.2.1
|
2019-02-12 06:58:24 +00:00
|
|
|
github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568
|
2019-06-11 06:19:11 +00:00
|
|
|
github.com/getsentry/raven-go v0.2.0
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/go-ole/go-ole v1.2.4 // indirect
|
|
|
|
github.com/gobwas/glob v0.2.3
|
2019-10-18 07:51:04 +00:00
|
|
|
github.com/gogo/protobuf v1.3.1
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6
|
2019-08-23 08:15:52 +00:00
|
|
|
github.com/golang/mock v1.3.1 // indirect
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/jackpal/gateway v1.0.5
|
2020-01-03 11:39:59 +00:00
|
|
|
github.com/jackpal/go-nat-pmp v1.0.2
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
2018-12-18 11:36:38 +00:00
|
|
|
github.com/kr/pretty v0.1.0 // indirect
|
2019-07-22 07:07:22 +00:00
|
|
|
github.com/lib/pq v1.2.0
|
2019-10-14 17:30:00 +00:00
|
|
|
github.com/lucas-clemente/quic-go v0.12.1
|
2019-07-22 18:46:52 +00:00
|
|
|
github.com/maruel/panicparse v1.3.0
|
2019-12-16 07:52:02 +00:00
|
|
|
github.com/mattn/go-isatty v0.0.11
|
2019-09-16 07:28:46 +00:00
|
|
|
github.com/minio/sha256-simd v0.1.1
|
2019-08-23 08:15:52 +00:00
|
|
|
github.com/onsi/ginkgo v1.9.0 // indirect
|
|
|
|
github.com/onsi/gomega v1.6.0 // indirect
|
2020-01-14 05:57:08 +00:00
|
|
|
github.com/oschwald/geoip2-golang v1.4.0
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
|
2020-01-20 19:05:19 +00:00
|
|
|
github.com/pkg/errors v0.9.1
|
2019-10-22 19:56:32 +00:00
|
|
|
github.com/prometheus/client_golang v1.2.1
|
2019-09-05 13:13:05 +00:00
|
|
|
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563
|
2018-12-18 11:36:38 +00:00
|
|
|
github.com/sasha-s/go-deadlock v0.2.0
|
2019-07-23 19:48:53 +00:00
|
|
|
github.com/shirou/gopsutil v0.0.0-20190714054239-47ef3260b6bf
|
lib/db: Deduplicate block lists in database (fixes #5898) (#6283)
* lib/db: Deduplicate block lists in database (fixes #5898)
This moves the block list in the database out from being just a field on
the FileInfo to being an object of its own. When putting a FileInfo we
marshal the block list separately and store it keyed by the sha256 of
the marshalled block list. When getting, if we are not doing a
"truncated" get, we do an extra read and unmarshal for the block list.
Old block lists are cleared out by a periodic GC sweep. The alternative
would be to use refcounting, but:
- There is a larger risk of getting that wrong and either dropping a
block list in error or keeping them around forever.
- It's tricky with our current database, as we don't have dirty reads.
This means that if we update two FileInfos with identical block lists in
the same transaction we can't just do read/modify/write for the ref
counters as we wouldn't see our own first update. See above about
tracking this and risks about getting it wrong.
GC uses a bloom filter for keys to avoid heavy RAM usage. GC can't run
concurrently with FileInfo updates so there is a new lock around those
operation at the lowlevel.
The end result is a much more compact database, especially for setups
with many peers where files get duplicated many times.
This is per-key-class stats for a large database I'm currently working
with, under the current schema:
```
0x00: 9138161 items, 870876 KB keys + 7397482 KB data, 95 B + 809 B avg, 1637651 B max
0x01: 185656 items, 10388 KB keys + 1790909 KB data, 55 B + 9646 B avg, 924525 B max
0x02: 916890 items, 84795 KB keys + 3667 KB data, 92 B + 4 B avg, 192 B max
0x03: 384 items, 27 KB keys + 5 KB data, 72 B + 15 B avg, 87 B max
0x04: 1109 items, 17 KB keys + 17 KB data, 15 B + 15 B avg, 69 B max
0x06: 383 items, 3 KB keys + 0 KB data, 9 B + 2 B avg, 18 B max
0x07: 510 items, 4 KB keys + 12 KB data, 9 B + 24 B avg, 41 B max
0x08: 1349 items, 12 KB keys + 10 KB data, 9 B + 8 B avg, 17 B max
0x09: 194 items, 0 KB keys + 123 KB data, 5 B + 634 B avg, 11484 B max
0x0a: 3 items, 0 KB keys + 0 KB data, 14 B + 7 B avg, 30 B max
0x0b: 181836 items, 2363 KB keys + 10694 KB data, 13 B + 58 B avg, 173 B max
Total 10426475 items, 968490 KB keys + 9202925 KB data.
```
Note 7.4 GB of data in class 00, total size 9.2 GB. After running the
migration we get this instead:
```
0x00: 9138161 items, 870876 KB keys + 2611392 KB data, 95 B + 285 B avg, 4788 B max
0x01: 185656 items, 10388 KB keys + 1790909 KB data, 55 B + 9646 B avg, 924525 B max
0x02: 916890 items, 84795 KB keys + 3667 KB data, 92 B + 4 B avg, 192 B max
0x03: 384 items, 27 KB keys + 5 KB data, 72 B + 15 B avg, 87 B max
0x04: 1109 items, 17 KB keys + 17 KB data, 15 B + 15 B avg, 69 B max
0x06: 383 items, 3 KB keys + 0 KB data, 9 B + 2 B avg, 18 B max
0x07: 510 items, 4 KB keys + 12 KB data, 9 B + 24 B avg, 41 B max
0x09: 194 items, 0 KB keys + 123 KB data, 5 B + 634 B avg, 11484 B max
0x0a: 3 items, 0 KB keys + 0 KB data, 14 B + 17 B avg, 51 B max
0x0b: 181836 items, 2363 KB keys + 10694 KB data, 13 B + 58 B avg, 173 B max
0x0d: 44282 items, 1461 KB keys + 61081 KB data, 33 B + 1379 B avg, 1637399 B max
Total 10469408 items, 969939 KB keys + 4477905 KB data.
```
Class 00 is now down to 2.6 GB, with just 61 MB added in class 0d.
There will be some additional reads in some cases which theoretically
hurts performance, but this will be more than compensated for by smaller
writes and better compaction.
On my own home setup which just has three devices and a handful of
folders the difference is smaller in absolute numbers of course, but
still less than half the old size:
```
0x00: 297122 items, 20894 KB keys + 306860 KB data, 70 B + 1032 B avg, 103237 B max
0x01: 115299 items, 7738 KB keys + 17542 KB data, 67 B + 152 B avg, 419 B max
0x02: 1430537 items, 121223 KB keys + 5722 KB data, 84 B + 4 B avg, 253 B max
...
Total 1947412 items, 151268 KB keys + 337485 KB data.
```
to:
```
0x00: 297122 items, 20894 KB keys + 37038 KB data, 70 B + 124 B avg, 520 B max
0x01: 115299 items, 7738 KB keys + 17542 KB data, 67 B + 152 B avg, 419 B max
0x02: 1430537 items, 121223 KB keys + 5722 KB data, 84 B + 4 B avg, 253 B max
...
0x0d: 18041 items, 595 KB keys + 71964 KB data, 33 B + 3988 B avg, 101109 B max
Total 1965447 items, 151863 KB keys + 139628 KB data.
```
* wip
* wip
* wip
* wip
2020-01-24 07:35:44 +00:00
|
|
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
2019-07-09 20:33:22 +00:00
|
|
|
github.com/syncthing/notify v0.0.0-20190709140112-69c7a957d3e2
|
2019-10-03 15:45:42 +00:00
|
|
|
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
|
2019-01-28 21:45:56 +00:00
|
|
|
github.com/thejerf/suture v3.0.2+incompatible
|
2019-11-25 10:05:55 +00:00
|
|
|
github.com/urfave/cli v1.22.2
|
2018-12-18 11:36:38 +00:00
|
|
|
github.com/vitrun/qart v0.0.0-20160531060029-bf64b92db6b0
|
lib/db: Deduplicate block lists in database (fixes #5898) (#6283)
* lib/db: Deduplicate block lists in database (fixes #5898)
This moves the block list in the database out from being just a field on
the FileInfo to being an object of its own. When putting a FileInfo we
marshal the block list separately and store it keyed by the sha256 of
the marshalled block list. When getting, if we are not doing a
"truncated" get, we do an extra read and unmarshal for the block list.
Old block lists are cleared out by a periodic GC sweep. The alternative
would be to use refcounting, but:
- There is a larger risk of getting that wrong and either dropping a
block list in error or keeping them around forever.
- It's tricky with our current database, as we don't have dirty reads.
This means that if we update two FileInfos with identical block lists in
the same transaction we can't just do read/modify/write for the ref
counters as we wouldn't see our own first update. See above about
tracking this and risks about getting it wrong.
GC uses a bloom filter for keys to avoid heavy RAM usage. GC can't run
concurrently with FileInfo updates so there is a new lock around those
operation at the lowlevel.
The end result is a much more compact database, especially for setups
with many peers where files get duplicated many times.
This is per-key-class stats for a large database I'm currently working
with, under the current schema:
```
0x00: 9138161 items, 870876 KB keys + 7397482 KB data, 95 B + 809 B avg, 1637651 B max
0x01: 185656 items, 10388 KB keys + 1790909 KB data, 55 B + 9646 B avg, 924525 B max
0x02: 916890 items, 84795 KB keys + 3667 KB data, 92 B + 4 B avg, 192 B max
0x03: 384 items, 27 KB keys + 5 KB data, 72 B + 15 B avg, 87 B max
0x04: 1109 items, 17 KB keys + 17 KB data, 15 B + 15 B avg, 69 B max
0x06: 383 items, 3 KB keys + 0 KB data, 9 B + 2 B avg, 18 B max
0x07: 510 items, 4 KB keys + 12 KB data, 9 B + 24 B avg, 41 B max
0x08: 1349 items, 12 KB keys + 10 KB data, 9 B + 8 B avg, 17 B max
0x09: 194 items, 0 KB keys + 123 KB data, 5 B + 634 B avg, 11484 B max
0x0a: 3 items, 0 KB keys + 0 KB data, 14 B + 7 B avg, 30 B max
0x0b: 181836 items, 2363 KB keys + 10694 KB data, 13 B + 58 B avg, 173 B max
Total 10426475 items, 968490 KB keys + 9202925 KB data.
```
Note 7.4 GB of data in class 00, total size 9.2 GB. After running the
migration we get this instead:
```
0x00: 9138161 items, 870876 KB keys + 2611392 KB data, 95 B + 285 B avg, 4788 B max
0x01: 185656 items, 10388 KB keys + 1790909 KB data, 55 B + 9646 B avg, 924525 B max
0x02: 916890 items, 84795 KB keys + 3667 KB data, 92 B + 4 B avg, 192 B max
0x03: 384 items, 27 KB keys + 5 KB data, 72 B + 15 B avg, 87 B max
0x04: 1109 items, 17 KB keys + 17 KB data, 15 B + 15 B avg, 69 B max
0x06: 383 items, 3 KB keys + 0 KB data, 9 B + 2 B avg, 18 B max
0x07: 510 items, 4 KB keys + 12 KB data, 9 B + 24 B avg, 41 B max
0x09: 194 items, 0 KB keys + 123 KB data, 5 B + 634 B avg, 11484 B max
0x0a: 3 items, 0 KB keys + 0 KB data, 14 B + 17 B avg, 51 B max
0x0b: 181836 items, 2363 KB keys + 10694 KB data, 13 B + 58 B avg, 173 B max
0x0d: 44282 items, 1461 KB keys + 61081 KB data, 33 B + 1379 B avg, 1637399 B max
Total 10469408 items, 969939 KB keys + 4477905 KB data.
```
Class 00 is now down to 2.6 GB, with just 61 MB added in class 0d.
There will be some additional reads in some cases which theoretically
hurts performance, but this will be more than compensated for by smaller
writes and better compaction.
On my own home setup which just has three devices and a handful of
folders the difference is smaller in absolute numbers of course, but
still less than half the old size:
```
0x00: 297122 items, 20894 KB keys + 306860 KB data, 70 B + 1032 B avg, 103237 B max
0x01: 115299 items, 7738 KB keys + 17542 KB data, 67 B + 152 B avg, 419 B max
0x02: 1430537 items, 121223 KB keys + 5722 KB data, 84 B + 4 B avg, 253 B max
...
Total 1947412 items, 151268 KB keys + 337485 KB data.
```
to:
```
0x00: 297122 items, 20894 KB keys + 37038 KB data, 70 B + 124 B avg, 520 B max
0x01: 115299 items, 7738 KB keys + 17542 KB data, 67 B + 152 B avg, 419 B max
0x02: 1430537 items, 121223 KB keys + 5722 KB data, 84 B + 4 B avg, 253 B max
...
0x0d: 18041 items, 595 KB keys + 71964 KB data, 33 B + 3988 B avg, 101109 B max
Total 1965447 items, 151863 KB keys + 139628 KB data.
```
* wip
* wip
* wip
* wip
2020-01-24 07:35:44 +00:00
|
|
|
github.com/willf/bitset v1.1.10 // indirect
|
|
|
|
github.com/willf/bloom v2.0.3+incompatible
|
2019-09-05 13:13:05 +00:00
|
|
|
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472
|
|
|
|
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297
|
2019-05-29 09:42:07 +00:00
|
|
|
golang.org/x/text v0.3.2
|
2019-09-05 13:13:05 +00:00
|
|
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
|
|
|
|
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
|
2018-12-18 11:36:38 +00:00
|
|
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
|
|
|
|
gopkg.in/ldap.v2 v2.5.1
|
|
|
|
)
|
2019-06-30 11:18:34 +00:00
|
|
|
|
2020-03-01 11:59:49 +00:00
|
|
|
go 1.13
|
2020-02-26 19:25:24 +00:00
|
|
|
|
|
|
|
// https://github.com/spaolacci/murmur3/pull/30
|
|
|
|
replace github.com/spaolacci/murmur3 v1.1.0 => github.com/calmh/murmur3 v1.1.1-0.20200226160057-74e9af8f47ac
|