Giter VIP home page Giter VIP logo

Comments (4)

bosilca avatar bosilca commented on June 19, 2024

I saw your question on MPICH mailing list, but it was slightly different than what you asked on OMPI user mailing list or what you state on this issue. Because, while MPICH does have some level of support for zero-copy over XPMEM that is not true for structs (which is the exact type you asked about on OMPI user mailing list) nor does provide similar support when UCX is used as underlying transport (for intra-node communications).

Thus, even if we add node-level support for zero-copy over XPMEM as soon as you will enable UCX that will be useless.

from ompi.

pascal-boeschoten-hapteon avatar pascal-boeschoten-hapteon commented on June 19, 2024

Thanks, I see. Is UCX itself unable to do non-contiguous zero-copy (either intra-node or inter-node), or is it not supported on the OMPI/MPICH side?

Not having zero-copy for non-contiguous sends means certain data structures need to be split into many requests.
For example, if you have this:

struct S {
	std::vector<float> vec_f;  // size 10k
	std::vector<int> vec_i;    // size 10k
	std::vector<double> vec_d; // size 10k
	std::vector<char> vec_c;   // size 10k
};
std::vector<S> vec_s; // size 100

Being able to send it in 1 request instead of 400 (one for each contiguous buffer) seems like it could be quite advantageous, for performance and ease of use.
Even if there are restrictions, e.g. the buffer datatypes must be MPI_BYTE (i.e. assuming the sender and receiver have the same architecture / homogeneous cluster).

At the moment sending such a datatype in 1 request with a struct results in packing/unpacking, which is very slow for large buffers, so much so that it is significantly slower than sending 400 zero-copy requests as in the aforementioned example.
You mentioned in the mailing list that doing it in 1 zero-copy request is a complex operation that would be expensive and add significant latency.
But it seems like it could at least be an improvement over 400 separate zero-copy requests?

Other use cases could be sending many sub-views of a large 2D array, or sending map-like/tree-like types.

from ompi.

yosefe avatar yosefe commented on June 19, 2024

@pascal-boeschoten-hapteon UCX API currently does not optimize (for example zero-copy over RDMA or XPMEM) for complex datatypes, even though this is something that was discussed and considered to add.

from ompi.

pascal-boeschoten-hapteon avatar pascal-boeschoten-hapteon commented on June 19, 2024

@yosefe Thanks, that's good to know.

@bosilca To give a bit more context, we've observed that when sending many large and complex data structures (similar to the one in the example above) to many other ranks, it's significantly slower to have many small zero-copy requests vs one big request with packing/unpacking. The sheer volume of requests seems to be the bottleneck and we've seen up to a factor of 5 difference in throughput. But when it's just 1 rank sending to 1 other rank, the many small zero-copy requests are faster, as the packing/unpacking becomes limited by memory bandwidth. It should mean that if we could have one big zero-copy request, the performance gain in the congested case would be very significant.

from ompi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.