21 Commits
Author SHA1 Message Date
Klaus Post ed0b962588 Modernize + Go version bump + Pin linter (#5256)
* Upgrade go version in CI.
* Add toolchain to pin version.
* Add linter/fumpt as pinned version in tools.
* Run `go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...`
2025-11-05 04:20:36 -08:00
dorman 8576e735b1 mirror and cp support set the maximum number of threads (#5220) 2025-07-02 09:49:52 -07:00
Klaus Post 96cb5cfc44 fix: limit manual GC to bigger objects (#4581) 2023-05-26 08:12:10 -07:00
Harshavardhana 34a67cb169 cleanup mc to use 'go' errs to be 'e' (#4450) 2023-01-24 02:03:57 -08:00
Klaus Post 52a931bfa7 Add staticcheck to CI (#4386) 2022-12-05 08:32:04 -08:00
adfost fd7142e223 update license headers to 2022 (#4360) 2022-11-14 18:38:39 -08:00
Harshavardhana a59f9e4d30 add gofumpt support, automated cleanup (#3911) 2022-01-06 10:55:40 -08:00
Harshavardhana 26e7e49cd7 honor cgroup memory limits in parallel-manager (#3871) 2021-11-18 14:30:02 -08:00
Anis Elleuch 7f37854b02 parallel-manager: Reduce parallelism when there is not enough memory (#3629)
Some users with low memory and good connection uploading some big files
can see memory crash, since mc will increase upload parallelism over
time when the bandwidth and the server is able to carry the load.

This PR will check the free OS memory before starting mirror/cp and will
estimate current memory usage based on uploaded objects sizes, it will
stop parallelism until the memory gets some room.
2021-09-01 09:07:26 -07:00
Harshavardhana 1402987ccb change license to AGPLv3 2021-05-11 17:45:08 -07:00
Anis Elleuch f3dd24f578 Implement barrier in parallel manager (#3469)
Mirroring watch supports parallel manager to run actions of the received
events in parallel, but sometimes the order of the execution of those
actions matter.

For example:
- A new bucket is created
- A new file is uploaded in the new bucket

This PR will bring support of the barrier concept. A task with a barrier
will only executed after all the previous tasks finish, the
subsequent tasks will also be only executed when the barrier task is
finished.

Later, we will bring support of tasks dependency to optimize the
parallelism.
2020-11-15 13:26:38 -08:00
Harshavardhana b2ab462551 add workers per GOMAXPROCS (#3483) 2020-11-11 09:22:39 -08:00
Anis Elleuch 6c2325129f Simply queueing to parallel manager (#3468) 2020-10-24 14:02:35 -07:00
Reinhard Koehn 609274326b Ensure 64bit alignment on 32bit builds for atomics (#3065)
Keep elements that are used with atomic.* functions as first element
of struct because it guarantees 64bit alignment on 32 bit machines.
atomic.* functions crash if operand is not aligned at 64bit.
See https://github.com/golang/go/issues/599
2020-02-04 13:17:27 -08:00
ebozduman 83a9d8b91d Adds missing codebase MinIO and min.io changes (#2745) 2019-04-16 22:31:54 -07:00
Harshavardhana 12627c35e4 Fix parallel upload performance issues (#2521)
Tested by transferring 29GiB data, around 246569 files
over 100Gig network.

- master branch
```
time mc mirror /root myminio/testbucket/
real	2m10s
```

- after changes
```
time mc mirror /root myminio/testbucket/
real	1m2s
```

By default runtime.NumCPU() workers are started.
2018-08-30 22:31:08 +05:30
Anis Elleuch 757fff7764 Simplify parallel manager implementation (#2413)
Each 5 seconds, calculate current bandwidth and add new workers as
bandwidth gets increased. Stop adding workers if it is not useful
for increasing bandwidth.
2018-04-06 18:46:35 -07:00
Harshavardhana 766e04d79d fix crashes on 32bit systems use LoadUint32() instead (#2389) 2018-02-12 10:25:06 -08:00
Harshavardhana 3b4626ea15 Bump max parallel workers to 32 (#2360) 2018-01-18 19:46:31 -08:00
Harshavardhana 13259eea21 mirror with --watch should copy and exit for s3 endpoints (#2345)
Current code wouldn't exit unless we press CTRL+C
even if the endpoints do not support --watch, this PR
fixes this behavior.
2018-01-08 10:56:56 -08:00
A. Elleuch 5ddf9728f8 Parallelize upload/remove in cp/mirror commands (#2289)
This PR removes --parallel flag and implements a dynamic way of adding
threads to accelerate mirror/cp command.

After the calculation of objects that need to be copied/removed, mc
sends tasks (upload/remove) to a parallel manager which monitors the
progress of tasks and decide to allocate more threads to it to
accelerate the overall work.

This is very useful when we copy/mirror many relatively small files.
2017-12-07 16:20:34 -08:00