Skip to content

octopus: revert of #46253, add tools: ceph-objectstore-tool is able to trim solely pg log dups' entries#46611

Merged
yuriw merged 3 commits intoceph:octopusfrom
rzarzynski:wip-55990-octopus
Jul 11, 2022
Merged

octopus: revert of #46253, add tools: ceph-objectstore-tool is able to trim solely pg log dups' entries#46611
yuriw merged 3 commits intoceph:octopusfrom
rzarzynski:wip-55990-octopus

Conversation

@rzarzynski
Copy link
Contributor

@rzarzynski rzarzynski commented Jun 9, 2022

Revert of #46253 and includes a2190f9

Technically this isn't a backport but a full revert of an already merged backport.

"Backport" ticket for the sake of tracking: https://tracker.ceph.com/issues/55990

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

This reverts commit 7cc1b29.
which is the in-OSD part of the fix for accumulation of `dup`
entries in a PG Log. Brainstorming it has brought questions
on the OSD's behaviour during an upgrade if there are tons of
dups in the log. What must be double-checked before bringing
it back is ensuring we chunk the deletions properly to not
impose OOMs / stalls in, to exemplify, RocksDB.

The backport ticket is: https://tracker.ceph.com/issues/55990

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This reverts commit ef04b8c.

Although the chunking in off-line `dups` trimming (via COT) seems
fine, the `ceph-objectstore-tool` is a client of `trim()` of
`PGLog::IndexedLog` which means than a partial revert is not
possible without extensive changes.

The backport ticket is: https://tracker.ceph.com/issues/55990

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
@rzarzynski rzarzynski added this to the octopus milestone Jun 9, 2022
@neha-ojha neha-ojha changed the title octopus: revert backport of #45529 octopus: revert of #46253 with tools: ceph-objectstore-tool is able to trim solely pg log dups' entries Jul 7, 2022
@neha-ojha neha-ojha changed the title octopus: revert of #46253 with tools: ceph-objectstore-tool is able to trim solely pg log dups' entries octopus: revert of #46253, add tools: ceph-objectstore-tool is able to trim solely pg log dups' entries Jul 7, 2022
The main assumption is trimming just dups doesn't need any update
to the corresponding pg_info_t.

Testing:

1. cluster without the autoscaler
```
rzarz@ubulap:~/dev/ceph/build$ MON=1 MGR=1 OSD=3 MGR=1 MDS=0 ../src/vstart.sh -l -b -n -o "osd_pg_log_dups_tracked=3000000" -o "osd_pool_default_pg_autoscale_mode=off"
```

2. 8 PGs in the testing pool.
```
rzarz@ubulap:~/dev/ceph/build$ bin/ceph osd pool create test-pool 8 8
```

3. Provisioning dups with rados bench
```
bin/rados bench -p test-pool 300 write -b 4096  --no-cleanup
...
Total time run:         300.034
Total writes made:      103413
Write size:             4096
Object size:            4096
Bandwidth (MB/sec):     1.34637
Stddev Bandwidth:       0.589071
Max bandwidth (MB/sec): 2.4375
Min bandwidth (MB/sec): 0.902344
Average IOPS:           344
Stddev IOPS:            150.802
Max IOPS:               624
Min IOPS:               231
Average Latency(s):     0.0464151
Stddev Latency(s):      0.0183627
Max latency(s):         0.0928424
Min latency(s):         0.0131932
```

4. Killing osd.0
```
rzarz@ubulap:~/dev/ceph/build$ kill 2572129 # pid of osd.0
```

5. Listing PGs on osd.0 and calculating number of pg log's entries and
dups:

```
rzarz@ubulap:~/dev/ceph/build$ bin/ceph-objectstore-tool --data-path dev/osd0 --op list-pgs --pgid 2.c > osd0_pgs.txt
rzarz@ubulap:~/dev/ceph/build$ for pgid in `cat osd0_pgs.txt`; do echo $pgid; bin/ceph-objectstore-tool --data-path dev/osd0 --op log --pgid $pgid | jq '(.pg_log_t.log|length),(.pg_log_t.dups|length)'; done
2.7
10020
3100
2.6
10100
3000
2.3
10012
2800
2.1
10049
2900
2.2
10057
2700
2.0
10027
2900
2.5
10077
2700
2.4
10072
2900
1.0
97
0
```

6. Trimming dups
```
rzarz@ubulap:~/dev/ceph/build$ CEPH_ARGS="--osd_pg_log_dups_tracked 2500 --osd_pg_log_trim_max=100" bin/ceph-objectstore-tool --data-path dev/osd0 --op trim-pg-log-dups --pgid 2.7
max_dup_entries=2500 max_chunk_size=100
Removing keys dup_0000000020.00000000000000000001 - dup_0000000020.00000000000000000100
Removing keys dup_0000000020.00000000000000000101 - dup_0000000020.00000000000000000200
Removing keys dup_0000000020.00000000000000000201 - dup_0000000020.00000000000000000300
Removing keys dup_0000000020.00000000000000000301 - dup_0000000020.00000000000000000400
Removing keys dup_0000000020.00000000000000000401 - dup_0000000020.00000000000000000500
Removing keys dup_0000000020.00000000000000000501 - dup_0000000020.00000000000000000600
Finished trimming, now compacting...
Finished trimming pg log dups
```

7. Checking number of pg log's entries and dups
```
rzarz@ubulap:~/dev/ceph/build$ for pgid in `cat osd0_pgs.txt`; do echo $pgid; bin/ceph-objectstore-tool --data-path dev/osd0 --op log --pgid $pgid | jq '(.pg_log_t.log|length),(.pg_log_t.dups|length)'; done
2.7
10020
2500
2.6
10100
3000
2.3
10012
2800
2.1
10049
2900
2.2
10057
2700
2.0
10027
2900
2.5
10077
2700
2.4
10072
2900
1.0
97
0
```

Conflicts:
        src/tools/ceph_objectstore_tool.cc -- undetected conflict
        with d5445b8. Fixed by
        adopting the patch no not require the `unique_ptr<T>::get()`.

Fixes: https://tracker.ceph.com/issues/53729
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
(cherry picked from commit a2190f9)
@rzarzynski
Copy link
Contributor Author

There is a FTBFS due an undetected merge conflict in the COT commit. Replacing with the pacific's version.

@rzarzynski rzarzynski force-pushed the wip-55990-octopus branch from d3c7d98 to 263e0fa Compare July 8, 2022 06:58
@yuriw
Copy link
Contributor

yuriw commented Jul 8, 2022

@rzarzynski This PR seems like breaking the build:

https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos7,DIST=centos7,MACHINE_SIZE=gigantic/63787//consoleFull

/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/gigantic/release/15.2.16-324-g22f047e9/rpm/el7/BUILD/ceph-15.2.16-324-g22f047e9/src/tools/ceph_objectstore_tool.cc: In function ‘int main(int, char**)’: /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/gigantic/release/15.2.16-324-g22f047e9/rpm/el7/BUILD/ceph-15.2.16-324-g22f047e9/src/tools/ceph_objectstore_tool.cc:4445:36: error: request for member ‘get’ in ‘fs’, which is of pointer type ‘ObjectStore*’ (maybe you meant to use ‘->’ ?) ret = do_trim_pg_log_dups(fs.get(), coll, info, pgid,

@rzarzynski
Copy link
Contributor Author

@yuriw:

/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/gigantic/release/15.2.16-324-g22f047e9/rpm/el7/BUILD/ceph-15.2.16-324-g22f047e9/src/tools/ceph_objectstore_tool.cc:4445:36: error: request for member ‘get’ in ‘fs’, which is of pointer type ‘ObjectStore*’ (maybe you meant to use ‘->’ ?)
       ret = do_trim_pg_log_dups(fs.get(), coll, info, pgid,

Please use the updated version pushed this morning (commit ID 263e0fa).

@rzarzynski
Copy link
Contributor Author

jenkins test api

@yuriw yuriw merged commit 3497be4 into ceph:octopus Jul 11, 2022
@ljflores
Copy link
Member

Rados suite results: https://pulpito.ceph.com/?branch=wip-yuri7-testing-2022-07-08-1007-octopus

Failures, unrelated:
1. https://tracker.ceph.com/issues/55636
2. https://tracker.ceph.com/issues/55854

Details:
1. octopus: osd-bluefs-volume-ops.sh: TEST_bluestore2 fails with "FAILED ceph_assert(r == 0)" - Ceph - RADOS
2. Datetime AssertionError in test_health_history (tasks.mgr.test_insights.TestInsights) - Ceph - Mgr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants