5. Số đo crawler M1 trên Google Colab CPU-only

5. Số đo crawler M1 trên Google Colab CPU-only#

Tổng hợp các phiên chạy Google Colab CPU của 5 thành viên ở giai đoạn M1 (bao gồm phiên --resume của TRI kéo nốt 575 ID còn thiếu + sửa nguồn trên Colab CPU trước khi bước vào M2).

Hide code cell source

from pathlib import Path
import json
import pandas as pd
import matplotlib.pyplot as plt
from IPython.display import display, Markdown
data = json.loads((Path.cwd().parent / 'report_summary.json').read_text(encoding='utf-8'))
scope, m1, m2, bench = data['scope'], data['m1'], data['m2'], data['m2_benchmark']
plt.rcParams.update({'figure.figsize': (9.2, 4.2), 'axes.spines.top': False, 'axes.spines.right': False, 'figure.dpi': 120})
print(f"Toàn nhóm (5 thành viên): {scope['papers']:,} paper / {scope['versions']:,} version | Cập nhật: {data['report_date']}")
Toàn nhóm (5 thành viên): 25,000 paper / 41,498 version | Cập nhật: 2026-11-22

Hide code cell source

df_m1 = pd.DataFrame(m1['colab_sessions'])
display(Markdown('**Bảng 5.1. Các phiên crawler M1 trên Google Colab CPU-only.**'))
display(df_m1)
phases = pd.DataFrame(m1['phases_aggregated']).T.sort_values('elapsed_sec')
display(Markdown('**Bảng 5.2. Tổng hợp thời gian theo pha M1 (từ 4 thành viên full shard stats dùng được).**'))
display(phases)
phases['elapsed_sec'].plot.barh(color='#2f628e', xlabel='Tổng giây cộng dồn', title='Thời gian pha crawler M1 (các pha chạy nền gối đầu)')
plt.tight_layout(); plt.show()

Bảng 5.1. Các phiên crawler M1 trên Google Colab CPU-only.

session_label publications_count processed_this_run status runtime_sec peak_rss_mb avg_rss_mb colab_cpu
0 M1-TUAN 5000 5000 completed_with_errors 41362.868 1115.61 667.32 True
1 M1-DAT 5000 5000 completed_with_errors 38731.255 1129.52 572.63 True
2 M1-TAN 5000 5000 completed_with_errors 40399.386 1227.73 642.27 True
3 M1-TRI-resume 5000 644 paused_time_budget 6058.999 981.87 625.73 True
4 M1-TRIET 5000 5000 completed_with_errors 40776.403 1208.22 853.30 True

Bảng 5.2. Tổng hợp thời gian theo pha M1 (từ 4 thành viên full shard stats dùng được).

elapsed_sec calls
id_generation 0.316 240.0
export 28.955 4.0
rate_limit_wait 282.239 33.0
storage 746.096 4339.0
discovery 2094.922 413.0
extraction_wait 2168.396 30950.0
s2_batch 3076.622 1219.0
extract_clean 3432.432 30950.0
drive_backup 5328.157 1423.0
references 8881.266 52200.0
s2_recovery_wait 22577.279 182.0
download_clean 131274.702 33399.0
../_images/5d3421579f98bea9e3dd13432d06450d8761d12605b219235e0ec2d23e5043c2.png

Tài liệu và mã nguồn tham chiếu#