datafusion-ballista icon indicating copy to clipboard operation
datafusion-ballista copied to clipboard

`ExecutorMetatada` too verbose

Open milenkovicm opened this issue 5 months ago • 13 comments

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

ExecutorMetadata contains ExecutorSpecification & ExecutorOperatingSystemSpecification

pub struct ExecutorMetadata {
    /// Unique executor identifier.
    pub id: String,
    /// Hostname or IP address of the executor.
    pub host: String,
    /// Port number for data transfer.
    pub port: u16,
    /// Port number for gRPC communication.
    pub grpc_port: u16,
    /// Resource specification for this executor.
    pub specification: ExecutorSpecification,
    /// OS and hardware info for this executor
    pub os_info: ExecutorOperatingSystemSpecification,
}

where ExecutorOperatingSystemSpecification has more data (quite few of them strings

pub struct ExecutorOperatingSystemSpecification {
    /// System name
    pub system_name: String,
    /// Kernel version
    pub kernel_ver: String,
    /// OS version
    pub os_ver: String,
    /// OS version (long)
    pub os_ver_long: String,
    /// Number of physical cores available on this executor
    pub physical_cores: u32,
    /// Number of physical disks available on this executor
    pub num_disks: u32,
    /// Total disk space on this executor, in bytes
    pub total_disk_space: u64,
    /// Total available disk space on this executor, in bytes
    pub total_available_disk_space: u64,
    /// Open files limit on this executor
    pub open_files_limit: u64,
}

problem is that ExecutorMetadata is part of PartitionLocation

#[derive(Debug, Clone)]
pub struct PartitionLocation {
    /// The source partition ID from the map stage.
    pub map_partition_id: usize,
    /// The partition identifier.
    pub partition_id: PartitionId,
    /// Metadata about the executor hosting this partition.
    pub executor_meta: ExecutorMetadata,
    /// Statistics about the partition data.
    pub partition_stats: PartitionStats,
    /// shuffle file id
    pub file_id: Option<u64>,
    /// whether this partition uses sort shuffle
    pub is_sort_shuffle: bool,
}

which represent partition locations and which is going around from/to scheduler and executor, also it might be cached as part of stage informations. which would take a bit of space and might attribute #1836

Describe the solution you'd like

Trim down or change information/data structure representing executor metadata,

Describe alternatives you've considered

we can either make some fields of executor metadata optional or completely different data structure but we should not share unnecessary data to the executor

Additional context Add any other context or screenshots about the feature request here.

milenkovicm avatar Jun 09 '26 15:06 milenkovicm

@sandugood interested? if i remember correctly you might be familiar with that code ?

milenkovicm avatar Jun 09 '26 15:06 milenkovicm

perhaps executor id is redundant for some cases, for sure it might be repeated

milenkovicm avatar Jun 09 '26 15:06 milenkovicm

fyi @JarroVGIT

milenkovicm avatar Jun 09 '26 15:06 milenkovicm

Yeah, going to take a look at it Seems like we can make it optional, or move os_info and specification to another structure

sandugood avatar Jun 09 '26 15:06 sandugood

Would be good if we could decouple executor metadata from partition location. Might be big change but necessary with increasing number of partitions

milenkovicm avatar Jun 09 '26 17:06 milenkovicm

Would be good if we could decouple executor metadata from partition location. Might be big change but necessary with increasing number of partitions

I would agree with this, I think we should communicate identifiers and not full metadata. That might be a larger effort though, not sure who “owns” (or generates) the identifier (I expect it to be the executor who generates an uuid and passes it during registration to the scheduler/ExecuterManager, but not sure if that is how it is currently wired).

JarroVGIT avatar Jun 09 '26 17:06 JarroVGIT

Would be good if we could decouple executor metadata from partition location. Might be big change but necessary with increasing number of partitions

I would agree with this, I think we should communicate identifiers and not full metadata. That might be a larger effort though, not sure who “owns” (or generates) the identifier (I expect it to be the executor who generates an uuid and passes it during registration to the scheduler/ExecuterManager, but not sure if that is how it is currently wired).

You are right about executor generating the uuid for itself. It is done during the startup and communicated to the scheduler

sandugood avatar Jun 09 '26 21:06 sandugood

@sandugood , let me know if you are still working on this or I can potentially take a stab at it

coderfender avatar Jun 17 '26 04:06 coderfender

That PR is ready for review as of now

sandugood avatar Jun 17 '26 05:06 sandugood

Thank you . I will take a look then @sandugood

coderfender avatar Jun 17 '26 06:06 coderfender

@sandugood , I pushed the version / idea I had to reduce the bloat which is inline with the discussion here. https://github.com/apache/datafusion-ballista/pull/1875 . I am totally fine in closing it and let your implementation get merged but wanted to see if we could pick the best approaches from both PRs :)

coderfender avatar Jun 17 '26 07:06 coderfender

Yeah, totally fine with that @coderfender Thanks! It really comes down to that benchmarking at scale, where Scheduler crashed due to OOM

sandugood avatar Jun 17 '26 07:06 sandugood

Thank you . Would you mind taking a look at my PR ? I want you to lead the charge here if thats okay and I absolutely don't want to waste your work here

coderfender avatar Jun 17 '26 08:06 coderfender