Commit Graph

1225 Commits

Author SHA1 Message Date
Jarek Kowalski
331ff076bb cli: added number of files that are in the process of being hashed 2020-03-14 15:56:09 -07:00
Nick
78a921ab2c Rename Simple mutex 2020-03-14 12:00:22 -07:00
Nick
60d1cc821a [robustness testing] Implement metadata store for test metadata using kopia
Add an implementation of the metadata store using kopia snapshots and restores to manage persistence of walk metadata. Metadata are stored to and retrieved from the store, and a mechanism for persisting the store is implemented using kopia snapshots.
2020-03-14 12:00:22 -07:00
Jarek Kowalski
6b04b42794 tests: added smoke test that exercises all combinations of encryption and hashing 2020-03-13 20:42:12 -07:00
Jarek Kowalski
e2a169d2e8 hotfix: kopia-0.5.0 did not properly support 256-bit hashes 2020-03-13 20:42:12 -07:00
Jarek Kowalski
8d452a8285 performance: improvements to object manager (#336)
- added pooled splitters and ability to reset them without having to recreate
- added support for caller-provided compressor output to be able to pool it
- added pooling of compressor instances, since those are costly
2020-03-13 08:56:18 -07:00
Jarek Kowalski
526445a9c8 CLI: pre-allocated buffers for crypto benchmark (#343)
non-optimized (0.5.0)
  0. BLAKE2B-256-128      AES256-GCM-HMAC-SHA256 644.9 MiB / second

before this change:
  0. BLAKE2B-256-128      AES256-GCM-HMAC-SHA256 655.9 MiB / second

after (this change):
  0. BLAKE2B-256-128      AES256-GCM-HMAC-SHA256 781.5 MiB / second
2020-03-12 12:11:20 -07:00
Jarek Kowalski
e80f5536c3 performance: plumbed through output buffer to encryption and hashing,… (#333)
* performance: plumbed through output buffer to encryption and hashing, so that the caller can pre-allocate/reuse it

* testing: fixed how we do comparison of byte slices to account for possible nils, which can be returned from encryption
2020-03-12 08:27:44 -07:00
Jarek Kowalski
0d1a627dcb Improved upload performance and memory usage (#331)
Upload: reduced memory usage during uploads
Replaced custom work item management with much simpler solution.

Upload: added pooling of upload buffers
This reduces a lot of allocations and GC pressure.

In a test of 2 dirs x 100K files x 100 bytes each, allocated bytes
went from 27 GB to 20 GB.

This improves #93
2020-03-12 00:27:51 -07:00
Julio López
89c0c6bac4 Refactor CLI stats (#341)
* Helper package internal/stats
* Use internal/stats for blob gc stats
* Use internal/stats for content list stats
* Refactor gc stats
  - Leverages internal/stats package
  - Return GC stats
  - nit: error message formatting
  - Refactor block in gc.Run.
     Simplifies and reduces a level of indentation
2020-03-11 22:16:07 -07:00
Niraj Tolia
71e556304e Fix download link (#342) 2020-03-11 22:08:36 -07:00
Jarek Kowalski
6ce8410a29 Added OpenCensus (#339)
* repo: added some initial metrics using OpenCensus

* cli: added flags to expose Prometheus metrics on a local endpoint

`--metrics-listen-addr=localhost:X` exposes prometheus metrics on
   http://localhost:X/metrics

Also, kopia server will automatically expose /metrics endpoint on the
same port it runs as, without authentication.
2020-03-11 22:07:31 -07:00
Julio López
edc87fcce8 Refactor content stats (#340)
* Remove unused fields from content.Stats
* Refactor content.Stats
2020-03-11 21:47:05 -07:00
Jarek Kowalski
9c3d419bc3 Fixed social site logo - alternative #2 (#335)
* site: fixed twitter image

* site: trying different twitter card style
2020-03-10 23:13:47 -07:00
Jarek Kowalski
514df69afa performance: added wrapper around io.Copy()
this pools copy buffers so they can be reused instead of throwing away
after each io.Copy()
2020-03-10 21:52:30 -07:00
Jarek Kowalski
ec56ed3d70 Makefile: fixed layering test 2020-03-10 17:43:56 -07:00
Jarek Kowalski
f07d164829 Makefile: added layering-test, fixes #324 2020-03-10 13:18:23 -07:00
Nick
05852322da Add snapshotter interface and kopia implementation
Snapshotter interface describes an entity that can create,
restore, and delete snapshots, as well as manage a repository.

Add kopia implementation of the snapshotter interface.
2020-03-10 07:32:14 -07:00
Julio López
d9ce3d0ad6 Inject time in Kopia components (#314)
Motivation: Allow time injection for (unit) tests, to more easily test and
verify time-dependent invariants.

Add time injection support for:

* repo.Manager
* manifest.Manager
* snapshot.Uploader

Then, wire up to these components. The content.Manager already had support for
time injection, but was not wired up from the time function passed to repo creation.

Add an internal/faketime package for testing. Mainly code movement from testing
code in the repo/content package. Motivation: make it available to other packages
outside content Also, add simple tests for faketime functions.
2020-03-10 00:42:10 -07:00
Jarek Kowalski
5f96b0240a testing: added retry helper 2020-03-09 21:34:10 -07:00
Jarek Kowalski
bd3cace737 site: changed Community page to make it more obvious how to get to Slack and GitHub 2020-03-09 20:09:19 -07:00
Julio López
88ce341a40 Trivial cleanup for internal diff (#316)
* Prefer filepath.Join
* Remove downloadFile's receiver parameter
2020-03-09 18:18:42 -07:00
Jarek Kowalski
3ebef0ada9 snapshot: removed content stats from snapshot.Stats, which are confusing and incorrect if snapshots are done in parallel 2020-03-09 18:11:30 -07:00
Jarek Kowalski
d862bc2d44 site: delete news section since it's empty 2020-03-08 21:21:25 -07:00
Jarek Kowalski
7638d4a98e site: clarified docs based on Reddit questions, removed stale link to user mailing list which is not in use 2020-03-08 19:32:12 -07:00
Jarek Kowalski
159d736b2e site: added KopiaUI video link in the Getting Started 0.5.0 2020-03-07 23:06:16 -08:00
Jarek Kowalski
bc7d0fa2ce site: added homepage video that describes how to use KopiaUI 2020-03-07 23:06:16 -08:00
Jarek Kowalski
cd35e3bab5 cli: 'snapshot migrate' improvements to help with data migration
- cleaned up migration progress output
- fixed migration idempotency
- added migration of policies
- renamed --parallelism to --parallel
- improved e2e test
- do not prompt for password to source repository if persisted
2020-03-07 21:47:32 -08:00
Jarek Kowalski
d526843124 cli: fixed metadata cache size on connect/create 2020-03-07 21:47:32 -08:00
Jarek Kowalski
02ff38e7b4 site: removed dummy news post which were making netlify angry 0.5.0-rc1 2020-03-05 18:40:23 -08:00
Jarek Kowalski
1ef7caefd0 site: fixed favicons
- cleaned up kopia-flat.svg
- regenerated favicons using realfavicongenerator.net
- added missing partial HTML
2020-03-05 18:40:23 -08:00
Jarek Kowalski
6fa7da5a5f app: use KOPIA_VERSION computed in tools.mk 2020-03-05 18:40:03 -08:00
Jarek Kowalski
e6fe1aa7f3 kopia-ui: misc
- launch server on a randomized port
- added support for connecting to remote server
- embedded version info in the app and htmlui
2020-03-05 18:40:03 -08:00
Jarek Kowalski
c5cf95fdf6 cli: improved 'content verify'
Now you can quickly verify that all contents are correctly backed
by existing blob without downloading much.

You can still use '--full' to cause full download and decryption.
2020-03-05 17:33:56 -08:00
Jarek Kowalski
889f2ead59 cli: improved 'blob gc'
- do not remove blobs younger than 4h when performing blob GC,
  because they may have just been written
- parallelize deletes
- clean up console output
2020-03-05 17:33:56 -08:00
Jarek Kowalski
6f68b726a7 cli: improved 'content rewrite'
- removed confusing '--prefixed' option
- print timestamp of contents as they are rewritten
2020-03-05 17:33:56 -08:00
Jarek Kowalski
a4fad4ca5a cli: added 'blob stats' command 2020-03-05 17:33:56 -08:00
Jarek Kowalski
0dd109c208 manifest: added missing mutex on Delete() 2020-03-05 17:20:46 -08:00
Jarek Kowalski
fb181257bf cli: implemented update check, fixes #119 2020-03-04 22:06:05 -08:00
Jarek Kowalski
4b1e01b238 test: disabled TestFileStorageConcurrency on darwin until #299 is resolved 2020-03-04 21:56:17 -08:00
Nick
2c72fbd514 Remove FIO_USE_DOCKER env 2020-03-03 20:36:43 -08:00
Nick
b1e8773c1e Update tests/tools/fio/fio.go
Co-Authored-By: Julio López <julio+gh@kasten.io>
2020-03-03 20:36:43 -08:00
Nick
72aa2f2a97 Update tests/tools/fio/workload.go
Co-Authored-By: Julio López <julio+gh@kasten.io>
2020-03-03 20:36:43 -08:00
Nick
b98236a535 Use fio image from dockerhub
Changing image to ljishen/fio instead of building
an image in kopia.
2020-03-03 20:36:43 -08:00
Nick
c5d8c9a271 Using docker to wrap fio execution to add robustness tool tests to Travis
Update the fio runner to use a docker image if the appropriate environment variable is set. Docker image is built via a makefile target and used in the robustness tool tests.
2020-03-03 20:36:43 -08:00
Nick
27d61c038e Parallelizing snapshot fail test to decrease test time
Make each test case combination a sub-test, and running independently it in parallel. This gives a 3-4x speedup vs master in local testing.
2020-03-03 20:34:38 -08:00
Jarek Kowalski
3bf2bf408e moved some badges to the bottom 2020-03-02 21:51:56 -08:00
Jarek Kowalski
cc888fb76b travis: removed deployment to GH pages after switching to netlify 2020-03-02 21:51:56 -08:00
Jarek Kowalski
9198dcc98e README: added netlify badge 2020-03-02 21:51:56 -08:00
Nick
8e0167027d Use bytes buffer to capture stderr instead of reading pipe
Give a `*bytes.Buffer` to the command and let `package exec` read from the pipe into the buffer for us.

The current use of the `StderrPipe()` method was problematic; the documentation for os/exec states:

> Wait will close the pipe after seeing the command exit, so most callers need not close the pipe themselves. It is thus incorrect to call Wait before all reads from the pipe have completed. For the same reason, it is incorrect to use Run when using StderrPipe.
2020-03-02 17:04:46 -08:00