Skip to content
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

[DB-15395] Fix the IOPs calculation logic from considering seq_tup_read as reads to using number of scans(sequential and index) #2370

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

sanyamsinghal
Copy link
Collaborator

Describe the changes in this pull request

The change is for the bug identified where assess-migration command was reporting a very large cluster(number of nodes) even for a substantially small clusters.

Fixed the logic to make use of seq_scan and idx_scan of pg_stat_user_tables
Experiments results captured in sheet - https://docs.google.com/spreadsheets/d/177NIv6UPsL_TmQ2J9nLTPiEU2p_nYHHnDZvRMefcnbk/edit?usp=sharing

For example: A simple case where seq scans are happening

CREATE TABLE test_data (
    id SERIAL PRIMARY KEY,
    value TEXT
);

INSERT INTO test_data (value)
SELECT md5(random()::text) FROM generate_series(1, 100000);

— reads (seq scans)
DO $$ 
DECLARE i INT;
BEGIN
    FOR i IN 1..100 LOOP
        PERFORM COUNT(*) FROM test_data;
    END LOOP;
END $$;

Here earlier voyager was recommending - 34Nodes of 8vcpu instance types (screenshot 1)
Now recommending - 3 node 4vcpu instance types (screenshot 2)

screenshot 1:
Recommendation

screenshot 2:
Pasted Graphic 2

Describe if there are any user-facing changes

No. Only the actual recommendations would change based on the new logic(statistics changed)

How was this pull request tested?

Does your PR have changes that can cause upgrade issues?

Component Breaking changes?
MetaDB Yes/No
Name registry json Yes/No
Data File Descriptor Json Yes/No
Export Snapshot Status Json Yes/No
Import Data State Yes/No
Export Status Json Yes/No
Data .sql files of tables Yes/No
Export and import data queue Yes/No
Schema Dump Yes/No
AssessmentDB Maybe (changed the struct of TableIndexStats table)
Sizing DB Yes/No
Migration Assessment Report Json Maybe(Report will be changed wrt TableIndexStats)
Callhome Json Yes/No
YugabyteD Tables Yes/No
TargetDB Metadata Tables Yes/No

@sanyamsinghal
Copy link
Collaborator Author

@sanyamsinghal sanyamsinghal marked this pull request as ready for review March 4, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant