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

【性能】使用接口批量插入文章,1万条后整体站点十分卡顿。MySQL #4809

Closed
csa8280 opened this issue Nov 1, 2023 · 5 comments
Labels
area/core Issues or PRs related to the Halo Core priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@csa8280
Copy link

csa8280 commented Nov 1, 2023

是什么版本出现了此问题?

2.10.1

使用的什么数据库?

MySQL 8.x

使用的哪种方式运行?

Docker

在线站点地址

https://qpk.piastudy.com/

发生了什么?

使用接口插入1W条文章后,站点变的十分卡顿。
image

相关日志输出

No response

附加信息

{
    "spec": {
        "title": "xxxx",
        "slug": "1698752066105",
        "releaseSnapshot": "2a6b5263-4114-4d84-a589-4d14804296f9",
        "headSnapshot": "2a6b5263-4114-4d84-a589-4d14804296f9",
        "baseSnapshot": "2a6b5263-4114-4d84-a589-4d14804296f9",
        "owner": "xxxx",
        "template": "",
        "cover": "xxxx",
        "deleted": false,
        "publish": true,
        "publishTime": "2023-09-21T19:34:26.099Z",
        "pinned": false,
        "allowComment": true,
        "visible": "PUBLIC",
        "priority": 0,
        "excerpt": {
            "autoGenerate": false,
            "raw": "xxxxxx"
        },
        "categories": [
            "category-mTJwv"
        ],
        "tags": [],
        "htmlMetas": []
    },
    "status": {
        "phase": "DRAFT",
        "conditions": [
            {
                "type": "DRAFT",
                "status": "TRUE",
                "lastTransitionTime": "2023-11-01T01:31:19.465242059Z",
                "message": "Drafted post successfully.",
                "reason": "DraftedSuccessfully"
            }
        ]
    },
    "apiVersion": "content.halo.run/v1alpha1",
    "kind": "Post",
    "metadata": {
        "name": "aa87d2c4-2be7-43d8-b7b7-3b84e96f2e84",
        "labels": {},
        "annotations": {
            "content.halo.run/preferred-editor": "default"
        },
        "version": 1,
        "creationTimestamp": "2023-11-01T01:31:19.460023339Z"
    }
}
@JohnNiang
Copy link
Member

感谢测试反馈!

目前 Halo 的设计还无法应对大数据量的情况,不过后期会持续优化的。例如自动为 Extension 的 labels 加上索引,同时也支持自定义索引。

@ruibaby
Copy link
Member

ruibaby commented Nov 2, 2023

/area core
/priority important-longterm

@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Nov 2, 2023
@ruibaby
Copy link
Member

ruibaby commented Jan 26, 2024

目前已经实现了索引功能,文章也已经为必要的字段添加索引,相关 PR:

  1. refactor: using indexes to query post lists #5230
  2. feat: add index mechanism for extension #5121
  3. feat: optimized post reconciliation process for enhanced performance and resource utilization #5250

可以使用 2.12.0-alpha.2 以及即将发布的正式版本再测试下。

@ruibaby
Copy link
Member

ruibaby commented Feb 6, 2024

我们已经在 2.12.x 中优化了数据较多的场景,我将关闭此 issue,后续有其他性能问题欢迎提交新 issue。

/close

@f2c-ci-robot f2c-ci-robot bot closed this as completed Feb 6, 2024
Copy link

f2c-ci-robot bot commented Feb 6, 2024

@ruibaby: Closing this issue.

In response to this:

我们已经在 2.12.x 中优化了数据较多的场景,我将关闭此 issue,后续有其他性能问题欢迎提交新 issue。

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

3 participants