-
Notifications
You must be signed in to change notification settings - Fork 56
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
Database performance tweaks #226
Comments
We hit hight IO wait on our database instance that we only use to WRITE indexed data, so one of the entry-points was this post: https://serverfault.com/a/284824 There I learned about https://wiki.postgresql.org/wiki/Performance_Optimization and https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server Here are the discussed settings:
UPD: I have not seen any improvement from |
I bumped the hardware of the main instance (and all the replicas) to 8 vCPU and 52GB RAM UPD: That helped a bit, but not enough to resolve the lag we have |
I have disabled storing NFT and account_changes while keeping transaction and action-receipt actions on the beta nodes (started from block |
UPD: the It revealed unnecessary code in indexer-for-explorer, so there is no need to optimize itCurrently I see the following stats:The top dominating queries are: SELECT
"execution_outcome_receipts"."produced_receipt_id",
"receipts"."originated_from_transaction_hash"
FROM ("execution_outcome_receipts"
INNER JOIN
"receipts"
ON
"execution_outcome_receipts"."executed_receipt_id" = "receipts"."receipt_id")
WHERE
"execution_outcome_receipts"."produced_receipt_id" = ANY($1) INSERT INTO
"execution_outcomes" ("receipt_id",
"executed_in_block_hash",
"executed_in_block_timestamp",
"index_in_chunk",
"gas_burnt",
"tokens_burnt",
"executor_account_id",
"status",
"shard_id")
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9),
($10, $11, $12, $13, $14, $15, $16, $17, $18),
($19, $20, $21, $22, $23, $24, $25, $26, $27),
($28, $29, $30, $31, $32, $33, $34, $35, $36),
($37, $38, $39, $40, $41, $42, $43, $44, $45),
($46, $47, $48, $49, $50, $51, $52, $53, $54),
($55, $56, $57, $58, $59, $60, $61, $62, $63),
($64, $65, $66, $67, $68, $69, $70, $71, $72),
($73, $74, $75, $76, $77, $78, $79, $80, $81),
($82, $83, $84, $85, $86, $87, $88, $89, $90),
($91, $92, $93, $94, $95, $96, $97, $98, $99),
($100, $101, $102, $103, $104, $105, $106, $107, $108),
($109, $110, $111, $112, $113, $114, $115, $116, $117),
($118, $119, $120, $121, $122, $123, $124, $125, $126),
($127, $128, $129, $130, $131, $132, $133, $134, $135),
($136, $137, $138, $139, $140, $141, $142, $143, $144),
($145, $146, $147, $148, $149, ... @telezhnaya |
@telezhnaya We don't need to deal with that query at all, as it should be removed. |
I want to collect the knowledge we gain over running Indexer for Explorer in production here.
The text was updated successfully, but these errors were encountered: