storj/satellite/satellitedb
Egon Elbre cb781d66c7 satellite/overlay: optimize FindStorageNodes
Reduce the number of fields returned from the query.

Benchmark results in `satellite/overlay`:

benchstat before.txt after2.txt
name                               old time/op  new time/op  delta
SelectStorageNodes-32              7.85ms ± 1%  6.27ms ± 1%  -20.18%  (p=0.002 n=10+4)
SelectNewStorageNodes-32           8.21ms ± 1%  6.61ms ± 0%  -19.53%  (p=0.002 n=10+4)
SelectStorageNodesExclusion-32     17.2ms ± 1%  15.9ms ± 1%   -7.55%  (p=0.002 n=10+4)
SelectNewStorageNodesExclusion-32  17.8ms ± 2%  16.1ms ± 0%   -9.38%  (p=0.002 n=10+4)
FindStorageNodes-32                48.4ms ± 1%  45.1ms ± 0%   -6.69%  (p=0.002 n=10+4)
FindStorageNodesExclusion-32       79.2ms ± 1%  76.1ms ± 1%   -3.89%  (p=0.002 n=10+4)

Benchmark results from `satellite/overlay` after making them parallel:

benchstat before-parallel.txt after2-parallel.txt
name                               old time/op  new time/op  delta
SelectStorageNodes-32               548µs ± 1%   353µs ± 1%  -35.60%  (p=0.029 n=4+4)
SelectNewStorageNodes-32            562µs ± 0%   368µs ± 0%  -34.51%  (p=0.029 n=4+4)
SelectStorageNodesExclusion-32     1.02ms ± 1%  0.84ms ± 0%  -18.08%  (p=0.029 n=4+4)
SelectNewStorageNodesExclusion-32  1.03ms ± 1%  0.86ms ± 2%  -16.22%  (p=0.029 n=4+4)
FindStorageNodes-32                3.11ms ± 0%  2.79ms ± 1%  -10.27%  (p=0.029 n=4+4)
FindStorageNodesExclusion-32       4.75ms ± 0%  4.43ms ± 1%   -6.56%  (p=0.029 n=4+4)

Change-Id: I1d85e2764eb270f4c2b1998303ccfc1179d65b26
2020-03-30 18:36:23 +03:00
..
dbx satellite/accounting: Add index on bucket_bandwidth_rollups to minimize full table scans 2020-03-26 19:53:50 +00:00
pbold common: separate repository 2019-12-27 14:11:15 +02:00
satellitedbtest private/testplanet: allow modifying created database 2020-03-27 19:14:48 +00:00
testdata satellite/accounting: Add index on bucket_bandwidth_rollups to minimize full table scans 2020-03-26 19:53:50 +00:00
apikeys.go satellite/satellitedb: fixes to row handling 2020-01-16 17:07:26 +02:00
attribution_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
attribution.go satellite/satellitedb: add missing err check 2020-01-19 19:24:12 +00:00
buckets.go satellite/metainfo: check bucket existence on upload and listing 2020-03-17 15:43:22 +00:00
coinpaymentstxs.go satellite/payments: fail when trying to consume consumed transactions 2020-02-13 19:52:55 +00:00
consoledb_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
consoledb.go satellite/payments: fix promotional coupons 2020-01-29 16:40:43 +02:00
containment.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
coupons.go satellite/payments: More Cleanup and Satellite command to ensure we have stripe customers (#3805) 2020-03-16 20:34:15 +01:00
credits.go satellite/payments/stripecoinpayments: credits added to invoice calculations 2020-02-24 16:48:27 +00:00
customers.go satellite/payments: fix promotional coupons 2020-01-29 16:40:43 +02:00
database.go private/dbutil: add database name to configure as a tag 2020-03-26 16:50:15 +00:00
downtime.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
gracefulexit.go satellite/satellitedb: gracefulexit, add missing Errs check 2020-01-19 15:24:12 +00:00
heldamount.go satellitedb/heldamount updated, tests added + storagenode console updated 2020-03-19 15:37:45 +02:00
invoiceprojectrecords.go satellite/payments/stripecoinpayments: credits added to invoice calculations 2020-02-24 16:48:27 +00:00
irreparabledb.go satellite/repair: put irreparable segments in irreparableDB 2020-03-09 21:45:16 +00:00
migrate_test.go satellite/satellitedb: increase migrate test timeout 2020-03-09 14:30:50 +02:00
migrate.go satellite/accounting: Add index on bucket_bandwidth_rollups to minimize full table scans 2020-03-26 19:53:50 +00:00
offers.go satellite: use tagsql 2020-01-19 14:39:16 +02:00
orders.go satellite/orders: more efficient processing of orders 2020-03-18 09:03:30 +00:00
overlaycache.go satellite/overlay: optimize FindStorageNodes 2020-03-30 18:36:23 +03:00
peeridentities.go satellite: use tagsql 2020-01-19 14:39:16 +02:00
projectaccounting.go satellite/satellitedb: don't include GET_AUDIT and GET_REPAIR with chargeable BW 2020-02-07 12:02:44 +00:00
projectmembers_test.go web/satellite: project members sorting fixed (#3231) 2019-10-15 15:24:53 +03:00
projectmembers.go satellite/satellitedb: fixes to row handling 2020-01-16 17:07:26 +02:00
projects_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
projects.go satellite/satellitedb: check indexes on migration 2020-03-13 10:45:22 +00:00
regtokens.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
repairqueue.go satellite/satellitedb: use time zones with all timestamps 2020-03-05 21:11:25 +00:00
resetpasstokens.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
storagenodeaccounting.go satellitedb: removed unused id on storagenode_storage_tallies table, add index on node_id 2020-03-20 14:39:44 -07:00
stripecoinpaymentsdb.go satellite/payments : deposit bonuses (credits) added 2020-02-11 11:11:42 +00:00
usercredits.go satellite/satellitedb: fixes to row handling 2020-01-16 17:07:26 +02:00
users_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
users.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
utils_test.go common: separate repository 2019-12-27 14:11:15 +02:00
utils.go common: separate repository 2019-12-27 14:11:15 +02:00