Skip to content

Add bulk_read option for reading large amounts of Parquet files quickly #2033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

LeonLuttenberger
Copy link
Contributor

@LeonLuttenberger LeonLuttenberger commented Feb 17, 2023

Feature or Bugfix

  • Feature

Detail

  • Added a bulk_read_parquet parameter which will use the newly implemented ArrowParquetBaseDatasource when reading Parquet files. This won't check for any schema compatibility, resulting in significantly faster reading time. However, in order for that to work, the Parquet files must be uniform.
  • Changed the behavior of validate_schema so that it doesn't go through the schemas unless validate_schema=True.

The changes above have resulted in the following differences in performance when reading 1111 objects from S3:

  1. validate_schema=True and bulk_read_parquet=False: 76 seconds (this has been the default behavior thus far)
  2. validate_schema=False and bulk_read_parquet=False (AKA the closest equivalent to 1. ray.data.read_parquet(path).to_modin()): 50 seconds
  3. bulk_read_parquet=True: 18 seconds

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

Copy link
Contributor

@jaidisido jaidisido left a comment

Choose a reason for hiding this comment

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

Looks great, just a couple of comments

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as duplicate.

@LeonLuttenberger LeonLuttenberger changed the title [DRAFT] Switch between two Parquet data sources Add bulk_read option for reading large amounts of Parquet files quickly Feb 24, 2023
@LeonLuttenberger LeonLuttenberger marked this pull request as ready for review February 24, 2023 19:25
@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant

This comment was marked as outdated.

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: 5d72d4d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubStandardCodeBuild8C06-llutOAimTATs
  • Commit ID: 5d72d4d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant

This comment was marked as outdated.

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubLoadTests5656BB24-ATYtnXPE7MOa
  • Commit ID: 5d72d4d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@kukushking kukushking left a comment

Choose a reason for hiding this comment

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

Nice!

@LeonLuttenberger LeonLuttenberger merged commit 04956d9 into release-3.0.0 Feb 28, 2023
@LeonLuttenberger LeonLuttenberger deleted the dist/optimize-parquet-dataset-add-base-lutleon branch February 28, 2023 14:31
@jaidisido jaidisido linked an issue Mar 2, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider using ray.data.read_parquet_bulk when possible (@scale): Reading a large number of small S3 objects is slow and might eventually fail
4 participants