Skip to content

Handler_read_rnd 증가  #9

Open

Description

@dongwook-chan

시나리오

MySQL로부터 이벤트를 받아오기 위해 다음 코드를 실행했습니다.

from pymysqlreplication import BinLogStreamReader

stream = BinLogStreamReader(connection_settings=MYSQL_SETTINGS,
                                blocking=True,
                                )

for binlogevent in stream:
    pass

MySQL의 특성

이슈가 발생한 MySQL은 다음과 같은 특성이 있습니다.

  • binary log가 빈번히 rotate됨
  • 테이블 개수가 많으며, 테이블 당 컬럼 개수가 많음
  • DML이 빈번히 발생 중 (특정 테이블에 몰리지 않고, 전체 테이블에 골고루 DML 발생)

이슈

코드가 실행된 후에 MySQL의 Handler_read_rnd 값이 급증한 후 유지되고 있습니다.
Handler_read_rnd의 급증으로 인해 MySQL에 다음과 같은 영향이 있을 것으로 예상됩니다.

  • Disk IO 증대
  • 사용자의 쿼리에 대한 응답 시간 증대

요구 사항

위 코드를 실행한 후에도 Handler_read_rnd값이 실행 이전과 동일하도록 본 패키지 코드를 수정해주세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions