Skip to content

crimson/os/alienstore: submit from the alien world concurrently - #55039

Merged
Matan-B merged 1 commit into
ceph:mainfrom
cyx1231st:wip-crimson-alienstore-submit-concurrently
Jan 14, 2024
Merged

Matan-B merged 1 commit into
ceph:mainfrom
cyx1231st:wip-crimson-alienstore-submit-concurrently

Conversation

@cyx1231st

Copy link
Copy Markdown
Member

By removing wait() in this PR, in my local tests, rados-bench random write (1 replication) with AlienStore has improved ~80% with 32 cores, and by pining alien threads and seastar reactor threads to distinct CPUs, the results got another ~60% improvements.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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
  • jenkins test rook e2e

@Matan-B Matan-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please help me understand why concurrency should be safe here?

@cyx1231st

Copy link
Copy Markdown
Member Author

@Matan-B I think you are referring to why the commit order is still correct after removing wait(), which should be guaranteed by the concurrent wait_repop phase:

https://github.com/ceph/ceph/blob/main/src/crimson/osd/osd_operations/client_request.cc#L346

Log flushing might be reorderred at the seastar side, but I'm not sure if it is a good decision to send the log back to seastar initially... But making the thread blocked by alien submission looks problematic.

@Matan-B

Matan-B commented Jan 2, 2024

Copy link
Copy Markdown
Contributor

@Matan-B I think you are referring to why the commit order is still correct after removing wait(), which should be guaranteed by the concurrent wait_repop phase:

https://github.com/ceph/ceph/blob/main/src/crimson/osd/osd_operations/client_request.cc#L346

Log flushing might be reorderred at the seastar side, but I'm not sure if it is a good decision to send the log back to seastar initially... But making the thread blocked by alien submission looks problematic.

Thank you! Should we add a comment that log flushing may be reordered (if this turns out to be an issue in the future)?

@athanatos athanatos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fine -- presumably it has no effect if bluestore logging is disabled though?

@cyx1231st
cyx1231st force-pushed the wip-crimson-alienstore-submit-concurrently branch from abdbce6 to 2000620 Compare January 8, 2024 02:09
@cyx1231st

Copy link
Copy Markdown
Member Author

Should we add a comment that log flushing may be reordered (if this turns out to be an issue in the future)?

Added a comment.
And rebased.

@cyx1231st

Copy link
Copy Markdown
Member Author

jenkins test windows

@cyx1231st
cyx1231st force-pushed the wip-crimson-alienstore-submit-concurrently branch from 2000620 to a223060 Compare January 9, 2024 02:42
@cyx1231st

Copy link
Copy Markdown
Member Author

rebased

@cyx1231st

cyx1231st commented Jan 11, 2024 •

Copy link
Copy Markdown
Member Author

https://pulpito.ceph.com/yingxin-2024-01-10_02:12:17-crimson-rados-wip-yingxin-crimson-alienstore-submit-concurrently-2-distro-default-smithi/

7511023, 7511024, 7511027:

ERROR:teuthology.run_tasks:Saw exception from tasks.
ModuleNotFoundError: No module named 'tasks'

7511004:

INFO:teuthology.orchestra.run.smithi163.stderr:Error: Unable to find a match: cephfs-java

7511007: dead

case-7510994

osd_op_util.cc:16 : In function 'bool OpInfo::check_rmw(int) const', ceph_assert(%s) rmw_flags != 0
 0# 0x00007FDFA24A154C in /lib64/libc.so.6
 1# raise in /lib64/libc.so.6
 2# abort in /lib64/libc.so.6
 3# ceph::__ceph_assert_fail(char const*, char const*, int, char const*) in ceph-osd
 4# OpInfo::check_rmw(int) const in ceph-osd
 5# OpInfo::need_write_cap() const in ceph-osd
 6# OpInfo::may_write() const in ceph-osd
 7# OpInfo::rwordered() const in ceph-osd
 8# crimson::osd::PG::get_lock_type(OpInfo const&) in ceph-osd
 9# crimson::osd::PG::with_locked_obc(hobject_t const&, OpInfo const&, std::function<crimson::interruptible::                                   interruptible_future_detail<crimson::osd::IOInterruptCondition, crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&,         crimson::ec<2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<84> > >::_future<crimson::errorated_future_marker<void> > >  (boost::intrusive_ptr<crimson::osd::ObjectContext>, boost::intrusive_ptr<crimson::osd::ObjectContext>)>&&) in ceph-osd

7511015:

crimson/osd/pg_map.h:73 : In function 'crimson::osd::PGShardMapping::maybe_create_pg(spg_t, crimson::core_id_t)::<lambda(auto:122&)>::          <lambda(auto:125&)> [with auto:125 = crimson::osd::PGShardMapping]', ceph_assert(%s) inserted
 0# 0x00007F8D47AA154C in /lib64/libc.so.6
 1# raise in /lib64/libc.so.6
 2# abort in /lib64/libc.so.6
 3# ceph::__ceph_assert_fail(char const*, char const*, int, char const*) in ceph-osd
 4# 0x000056348593BBB3 in ceph-osd
 5# 0x0000563485A8695E in ceph-osd
 6# _ZNSt17_Function_handlerIFN7seastar6futureIvEERN7crimson3osd14PGShardMappingEEZNS0_7shardedIS5_E13invoke_on_allIZNS9_16invoke_on_othersIZZNS5_15maybe_create_pgE5spg_tjENKUlRT_E_clIS5_EEDaSE_EUlSE_E0_JEEES2_NS0_21smp_submit_to_optionsESD_DpT0_EUlS6_E_JEEES2_SI_SD_SK_EUlS6_E_E9_M_invokeERKSt9_Any_dataS6_ in ceph-osd
 7# 0x0000563485F02AFA in ceph-osd
 8# 0x00005634943C6FDE in ceph-osd
 9# 0x000056349442A227 in ceph-osd
10# 0x00005634946D0342 in ceph-osd
11# 0x00005634946D439D in ceph-osd
12# 0x00005634946D4919 in ceph-osd
13# 0x000056349413FE5C in ceph-osd
14# 0x00007F8D47A9F802 in /lib64/libc.so.6
15# 0x00007F8D47A3F450 in /lib64/libc.so.6

@Matan-B @athanatos the above two failures don't seem to be directly related to the improvements in alienstore this pr. I guess it might be side-effects from heavier pressure.

And I don't see them in the tracker yet, let me know if need to file new bugs.

@Matan-B

Matan-B commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

Scheduled a rerun for the infra failures (tasks,cephfs-java, dead job):
https://pulpito.ceph.com/matan-2024-01-11_09:00:03-crimson-rados-wip-yingxin-crimson-alienstore-submit-concurrently-2-distro-crimson-smithi/

rmw_flags != 0 is not related (new tracker - https://tracker.ceph.com/issues/64000)

We would have to look into crimson::osd::PGShardMapping::maybe_create_pg issue but I'm ok with merging that and opening a new tracker.

Lastly, can we revert the CnLog::_flush change? if we test for performance, bluestore debug should be disabled already. By looking at the new logs, it appears that it's introducing some noise to the logs.

@Matan-B Matan-B added the TESTED label Jan 11, 2024
@cyx1231st
cyx1231st force-pushed the wip-crimson-alienstore-submit-concurrently branch from a223060 to c15e56e Compare January 12, 2024 02:31
@cyx1231st

Copy link
Copy Markdown
Member Author

We would have to look into crimson::osd::PGShardMapping::maybe_create_pg issue but I'm ok with merging that and opening a new tracker.

https://tracker.ceph.com/issues/64009

Lastly, can we revert the CnLog::_flush change? if we test for performance, bluestore debug should be disabled already. By looking at the new logs, it appears that it's introducing some noise to the logs.

I'm good with the revert.

Changed to a warning comment:
// XXX: the waiting here will block the thread for an indeterministic peroid

I suppose we don't need to test the reverted change.

@cyx1231st

Copy link
Copy Markdown
Member Author

I'll merge if no further concerns.

@Matan-B
Matan-B merged commit 8be184a into ceph:main Jan 14, 2024
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