tags: cofacts, —

20260421 會議記錄

:::info

追蹤事項

GCE Migration

Elasticsearch 升級

:::success nonumpa 會協助 :::

Discord spammer

Cofacts.ai

過進度:https://github.com/orgs/cofacts/projects/12/views/1

Community updates

General Channel

Server Alerts

Github Activities

開會時間

RightsCon 擺攤

攤位資訊

Your Booth Details

The Community Village is the heart of RightsCon — a mixed-use space located on the ground floor within the Kenneth Kaunda wing of our venue, the MICC.

Booth #: Booth 17

Thematic Zone: Digital Security & Privacy

Date(s): Fri 8 May

Time slot: Half Day (9:00 AM – 1:00 PM)

Q: What is the exact footprint of my booth? A: A standard Community Village allocation includes: ● Footprint: 2m (width) x 2m (depth) designated floor area. ● Table: One 6ft x 2.5ft (1.8m x 0.75m) trestle table with a linen cloth. ● Seating: Two conference chairs. ● Max Display Height: 2.5 meters for any pull-up banners. ● Electrical: One plug point (Type G)

Q: Can I use floor-standing banners? A: Yes, provided they fit within your footprint and preferably behind your stand. Sustainability Tip: We recommend lightweight fabric X-frame banners over heavy vinyl roll-ups.

Q: What materials are recommended for my booth? A: We encourage you to use environmentally responsible materials in line with RightsCon’s commitment to sustainability. Examples could be fabric banners, QR codes linking to digital content, recycled cardboard displays, and potted plants. Please avoid, if possible, PVC/vinyl banners, foam boards, polystyrene, inflatables, single-use plastics and excessive printed materials. Please note that helium balloons are strictly prohibited.

Q: Does my booth need to be staffed for the entire duration of the exhibit? A: You are responsible for providing staff at your booth for the duration of the exhibit, and all exhibitors must be registered for RightsCon. Booths must be fully staffed throughout the duration of the period you have been assigned.

展出內容

目標群眾

:::success 回去點一下,不夠的話盡快印 :::

Bots and server network cost

Cost: $1.5/day –> $3/day ($45USD/mo –> $90USD/mo)

Monthly budget 從 250 USD 提升到 300 USD

📊 Cofacts Production Status Report (2026-04-21 更新版)

:::spoiler

20260419 調整 swapiness 並洗掉 swap

  1. Swap 爆滿原因
    • vm.swappiness: 設定值為 60 (Linux 預設值)。這代表當實體記憶體尚有餘裕時,系統仍會主動將較不常使用的分頁移往 Swap。
    • 最大佔用者: Java (Elasticsearch)。
      • 其中一個 Java 進程佔用了約 3.6GB 的 Swap,這幾乎吃光了 4GB 的 Swap 空間。
      • 這通常發生在實體記憶體曾經非常吃緊 (Pressure) 的時候,或是 Elasticsearch 分配的 Heap 雖然大,但部分記憶體區塊長時間未被讀寫,被系統強制 Swap out。
  2. 今日 (4/18) 負載異常分析
    • 目前 Load Average 約為 3-4,對於一台 4-vCPU (n2-custom-4-32768) 的機器來說,這仍在安全範圍但偏高。
    • 主要 CPU 消費者仍然是 elasticsearch 與 node /srv/www/server.js。

搬遷 site-tw 的風險評估與建議 既然您只想搬遷 site-tw 並關心 Swap 問題,以下是我的建議:

  1. 解決 Swap 效能隱憂: * 方法 A: 在搬遷前手動執行 swapoff -a && swapon -a (前提是 12GiB Free RAM 足以容納 4GB Swap 的內容)。這能清空 Swap 並讓所有內容回到實體記憶體,大幅提升系統反應。 * 方法 B: 調降 vm.swappiness 至 10,減少未來發生同樣情況的機率。
  2. 今日異常的關聯性: * 如果今日負載是常態(例如週末流量增加),搬遷 site-tw (約增加 0.8~1.0 vCPU 負載) 會使 Load Average 常態性維持在 4-5。
  3. 結論: * 搬遷可行: 系統目前還有 12GiB 實體記憶體,且 CPU 雖高但未破表。 * 操作順序建議: 1. 先優化 GCE 的 Swap 設定 (swappiness = 10)。 2. 監測 Elasticsearch 負載是否與今日 site-tw 的特定流量有關(如果共用後端 API)。 3. 將 site-tw 移至 GCE,並將其 CPU Limit 限制在合理範圍內(如果是透過 Docker 部署)。

✦ 根據 docker stats 與進程列表的即時分析,CPU 高負載的「真兇」呼之欲出了:

  1. CPU 主要消耗者 (即時數據)
  2. rumors-deploy-db-1 (Elasticsearch): 83.85% CPU。
    • 這是最大的來源。Elasticsearch 目前分配了 16GB Heap,且正在處理大量的查詢或索引作業。
  3. rumors-deploy-site-en-1: 78.48% CPU。
    • 這非常異常。一個英文版的 rumors-site 竟然佔用了近 80% 的 CPU。
  4. rumors-deploy-api-1: 32.32% CPU。
    • API 容器也承受了不小的壓力。
  5. url-resolver 的狀況
    • rumors-deploy-url-resolver-1: 0.01% CPU。
    • 它幾乎沒在動。所以 CPU 負載與它無關。
  6. 為什麼 site-en 這麼高? 通常 site-tw 的流量遠大於 site-en。site-en 衝到 78% CPU 可能的原因有:
    • 爬蟲攻擊: 可能有大量的機器人在爬英文版網站。
    • SSR (Server Side Rendering) 壓力: 如果有大量頁面正在進行伺服器端渲染,Node.js 的 CPU 會飆高。
    • 死循環或記憶體洩漏: 導致 Node.js 持續高負載。

總結

如果您想搬遷 site-tw 過來,我們可能得先弄清楚為什麼 site-en 會吃掉這麼多資源。您需要我查看 site-en 的日誌 (logs) 來確認是否有異常流量嗎? :::

⚡ 總結:4/18 開放 AI 爬蟲後負載翻倍

本週系統在 4/18 開放 AI Crawl Control 後出現顯著負載跳升。Cloud Run 上的 site-tw 已達配額上限,而 GCE 上的渲染服務則出現記憶體過度擴張,導致系統 Swap 緩衝歸零。


☁️ Cloud Run 狀況 (site-tw) 🚨 已達瓶頸


🖥️ GCE cofacts-prod 狀況 (site-en, site-ja, api)

1. CPU 負載 ⚠️ 4/18 起翻倍

| 日期 | 平均負載 | P95 負載 | 狀態 | |——|———|———|——| | 4/14 - 4/17 | ~23% | ~32% | 正常 | | 4/18 - 4/20 | ~48% | ~64% | ⚠️ 高負載 |

2. 記憶體管理異常 ⚠️ Swap 99.8% 已滿


🔍 深度分析:Swap 滿載與 Elasticsearch (ES) 的關聯

經查證,目前 4GB Swap 空間中,有 3.7 GB (約 92%) 是被 java (Elasticsearch) 所佔用。


🤖 Cloudflare AI Crawl 關聯分析


🔥 建議行動 (Action Items)

  1. Cloud Run 擴容 (site-tw):
    • 建議將 site-tw 的記憶體配額提升至 2GB,以應付 4/18 後的新常態。
  2. 建立觀察基準 (Swap 重整):
    • 手動執行 swapoff -a && swapon -a 清空當前 Swap,觀察它是否會在未來幾天因新爬蟲壓力再次快速增長。
  3. GCE 記憶體回收 (site-en, site-ja):
    • 已手動重啟一次。需觀察 30 分鐘後的記憶體回升速度,若回升過快,建議考慮將定時 pm2 reload 改為定時 docker restart。
  4. 長期控管:
    • 針對 Meta-ExternalAgent 在 Cloudflare 進行頻率限制。
    • 確保 ES bootstrap.memory_lock: true 有效。

Reporter: Gemini CLI Date: 2026-04-21