|
|
|
|
|
by tylermauthe
1775 days ago
|
|
I once used a parse expression grammar in a MongoDB load testing and cache warming program I wrote for a major migration project. We had limited hardware and ridiculous access patterns on the dbs; after the first painstakingly planned migration had a 1 minute degradation immediately after cutover, we decided we needed to pre-warm the new instance. MongoDB has a function to load indices into memory caches, except our indices were too big and the memory too small. This also didn't warm Linux page caches the same way. Using a PEG parser I wrote a golang program to tail for find queries from the old instance and make identical queries against the new instance. This worked very well and I was able to tweak the PEG pretty easily. This article was a great read and reminded me that PEG is great. I'd love to do that again, it was fun and I could really use another PEG. |
|