In the last year, we've gone from millions of pieces of data to billions of pieces of data. I will speak on a solution for scaling up and about the challenges presented. Also covered will be the future of data at Qihoo 360 with MongoDB.
MySQL 5.6 GA版本已经发布了,其中包含了大量的新特性,了解这些新特性,不仅对数据库内核研发有帮助,对于更好的使用MySQL数据库也有着极大的意义。本分享将深入剖析MySQL 5.6新特性的实现细节,一共分为两期:分别是InnoDB引擎以及MySQL Server。本次为第一期,分享 MySQL 5.6 InnoDB引擎中的性能优化与功能增强。
In the last year, we've gone from millions of pieces of data to billions of pieces of data. I will speak on a solution for scaling up and about the challenges presented. Also covered will be the future of data at Qihoo 360 with MongoDB.
MySQL 5.6 GA版本已经发布了,其中包含了大量的新特性,了解这些新特性,不仅对数据库内核研发有帮助,对于更好的使用MySQL数据库也有着极大的意义。本分享将深入剖析MySQL 5.6新特性的实现细节,一共分为两期:分别是InnoDB引擎以及MySQL Server。本次为第一期,分享 MySQL 5.6 InnoDB引擎中的性能优化与功能增强。
How do we manage more than one thousand of Pegasus clusters - backend partacelyc1112009
?
A presentation in Apache Pegasus meetup in 2021 from Wang Dan.
Know more about Pegasus https://pegasus.apache.org, https://github.com/apache/incubator-pegasus
7. disk
disk
補充: Process address space
text space
(read only)
data space
Heap space
Stack space
(variable、function…)
0x000000
0x7fffff
Process
Linux Kernel / file system
disk
Read / write
Buffer /
Cache
Direct
access
Active
Inactive
Anonymous page
cat /proc/meminfo
free -h
User
process managed Linux kernel
managed
Mongod
Mongod
7
Mongod LRU
Linux Memory LRU
Linux kernel
ballooning
8. 減少 blockstore 記憶體的消耗量,
平衡備份的穩定性? (2) – 觀察
? 目前 point in time (PIT) 每秒平均 oplog 寫入量及 incremental backup 的資料
量非常小
? 證明 blockstore 預留的 wiretigerCacheSize 與 oplog 量相差懸殊
? 由上兩點可以說明,以現在的量來看,應該不需要讓 Mongod 在 process 內預
留太多記憶體給 wiretiger engine 而浪費記憶體。
8
9. MongoDB data / oplog 成長量統計
? 3/24 ~ 4/1 大約成長 < 6GB
9
per day per week
MongoDB Blockstore 儲存
的大部分是 Oplog
24. (建議) 頻繁備份作業的優化建議–
Incremental Backup Period Change
? Incremental backup 也是增加記憶體使用量的原因之
一 (snapshot)
? 最初使用的 MongoDB 版本,因為 Point in Time (PIT)
功能有問題,而為了可能造成需要做 restore 的時間變
長,而拉長 MTTR 故障處理時間,所以做頻繁備份。
? 目前為每 6 小時/次,建議調整每日 (24小時) / 次
? 調整可利用 PIT recovery 的時間週期
? 由 1 天調整為 7 天或更小 (可考量 Storage 大小)
? Oplogs will be retained for this number of days.
? Snapshot must be kept more than this number of days.
24
#23: Mongodb 原廠文件建議可調的範圍
Values can range from 0.25 ~ 10,000 GB 。
Default 50%* (RAM - 1GB) or 256MB。
#24: Mongodb 原廠文件建議可調的範圍
Values can range from 0.25 ~ 10,000 GB 。
Default 50%* (RAM - 1GB) or 256MB。
#25: Oplog Size
When you start a replica set member for the first time, MongoDB creates an oplog of a default size if you do not specify the oplog size.?
For Unix and Windows systemsThe default oplog size depends on the storage engine:
In-Memory Storage Engine
5% of physical memory 50 MB(Lower Bound) 50 GB(Upper Bound)
WiredTiger Storage Engine
5% of free disk space 990 MB(Lower Bound) 50 GB(Upper Bound)
In most cases, the default oplog size is sufficient. For example, if an oplog is 5% of free disk space and fills up in 24 hours of operations,
then secondaries can stop copying entries from the oplog for up to 24 hours without becoming too stale to continue replicating.?
New in version 4.4:?Starting in MongoDB 4.4, you can specify the minimum number of hours to preserve an oplog entry.