Mongo Rocks 在SSD盘上表现优秀,专门为SSD盘的优化

2017 · MongoDB深圳用户组大会全记录 | MongoDB中文社区
http://www.mongoing.com/2017/04/24/mongodb-shenzhen-user-group

Mongo Rocks
优化与实践
腾讯云

孔德雨
2017.04

Mongo Rocks
简介

使用Rocks DB作为存储引擎的Mongo DB服务

基于由facebook开源的Rocks DB

适用于TB级KV-persist业务

在SSD盘上表现优秀,专门为SSD盘的优化

Rocks对SSD的亲和性

Rocks
将随机写转化为顺序写,提高
SSD
使用寿命

Rocks
空间利用率高,
SSD
存储宝贵

Mongo Rocks 在SSD盘上表现优秀,专门为SSD盘的优化

Mongo Rocks事务性

Mongo DB单行事务性:

索引/数据/Oplog的一致性更新

利用Rocks DB::Write Batch实现

Mongo DB持久性:

基于Rocks DB::Sync WAL

支持定期刷盘/每次写入刷盘两种模式

Mongo DB隔离性:

Snap Shot Isolation级读写

基于Rocks的快速快照机制,支持Majority Read

w

get back to the slower clock rate that allows it to save more power

http://www.howtogeek.com/177790/why-you-cant-use-cpu-clock-speed-to-compare-computer-performance/

Why You Can’t Use CPU Clock Speed to Compare Computer Performance

Shopping for a new computer? Don’t pay too much attention to CPU clock speed. “CPU speed” was once an easy, if not completely accurate, way to compare two computers’ performance — just compare the GHz. But not anymore.

Modern CPUs are more than fast enough for most basic tasks, so you’ll also want to look at other things when it comes to comparing performance. For example, does the computer come with an SSD or a slower magnetic hard disk?

 

Why You Can’t Just Compare Clock Speeds

CPU clock speed, or clock rate, is measured in Hertz — generally in gigahertz, or GHz. A CPU’s clock speed rate is a measure of how many clock cycles a CPU can perform per second. For example, a CPU with a clock rate of 1.8 GHz can perform 1,800,000,000 clock cycles per second.

This seems simple on its face. The more clock cycles a CPU can perform, the more things it can get done, right? Well, yes and no.

On the one hand, clock speeds are useful when comparing similar CPUs in the same family. For example, let’s say you’re comparing two Intel Haswell Core i5 CPUs, which only differ in their clock rate. One runs at 3.4 GHz, and one runs at 2.6 GHz. In this case, the 3.4 GHz processor will perform 30% faster when they’re both running at their top speed. This is true because the processors are otherwise the same. But you can’t compare the Haswell Core i5’s CPU clock rate against another type of CPU, such as an AMD CPU, ARM CPU, or even an older Intel CPU.

This may not seem obvious at first, but it’s actually for a very simple reason. Modern CPUs are becoming much more efficient. That is, they can get more work done per clock cycle. For example, Intel released Pentium 4 chips clocked at 3.6 GHz in 2006. It’s now the end of 2013 and the latest, fastest Intel Haswell Core i7 CPUs are clocked at 3.9 GHz from the factory. Does that mean CPU performance has only improved a tiny bit in seven years? Not at all!

Instead, the Core i7 CPU can simply do much more during each clock cycle. It’s important to look not just at clock cycles but at the amount of work a CPU can do per clock cycle. All other things being equal, fewer clock cycles with more work are better than more clock cycles with less — fewer clock cycles means the CPU requires less power and produces less heat.

In addition, modern processors also have other improvements that allow them to perform faster. This includes additional CPU cores and larger amounts of CPU cache memory that the CPU can work with.

Mongo Rocks 在SSD盘上表现优秀,专门为SSD盘的优化

Dynamic Clock Speed Adjustments

Modern CPUs also aren’t fixed at a single speed, particularly laptop, smartphone, tablet, and other mobile CPUs where power efficiency and heat production are major concerns. Instead, the CPU runs at a slower speed when idle (or when you’re not doing too much) and a faster speed under load. The CPU dynamically increases and decreases its speed when needed. When doing something demanding, the CPU will increase its clock rate, get the work done as quickly as possible, and get back to the slower clock rate that allows it to save more power.

So, if you’re shopping for a laptop, you’ll also want to consider this. Bear in mind that cooling is a factor, too — a CPU in an Ultrabook may only be able to run at its top speed for a certain amount of time before running at a lower speed because it can’t be properly cooled. The CPU may not be able to maintain top speed all the time due to overheating concerns. On the other hand, a computer with the exact same CPU but better cooling may have better, more consistent performance at top speeds if it can keep the CPU cool enough to run at those top speeds for longer.

Mongo Rocks 在SSD盘上表现优秀,专门为SSD盘的优化

Other Hardware Matters, Especially Solid-State Drives

Other hardware is also very important when it comes to your computer’s general performance. For example, most computer users will probably consider a computer with a solid-state drive faster than a computer with a traditional magnetic hard drive in normal use, even if the computer with a traditional magnetic hard drive has a CPU that performs better. Hard disk access is a serious performance bottleneck. Whether a computer has an SSD will likely be a more important question than how fast its CPU is.

SSDs aren’t the only important piece of hardware, of course. Having more RAM will allow you to do more things at once without constantly swapping to your computer’s page file, while a more powerful graphics card will improve PC gaming performance more than a faster CPU. On the other hand, if all you want to do is browse the web, watch videos, and work on documents, a faster graphics card or even more RAM above a certain point won’t be noticeable.

Mongo Rocks 在SSD盘上表现优秀,专门为SSD盘的优化

How to Compare Computer Performance

You can’t simply look at a CPU speed number and know which computer is faster, or how much faster a computer will be in the real world. Most people also won’t necessarily notice CPU performance improvements above a certain point. For example, a MacBook Air or comparable Ultrabook has a slower Intel Haswell Core i5 processor that’s designed to save power and run as cool as possible. However, if you just want to browse the web, listen to music, watch videos, and work with documents, the CPU may well be fast enough that you wouldn’t notice the difference between it and a significantly faster desktop-class CPU. Not only is CPU clock rate not critical — CPU performance itself is becoming less critical.

On the other hand, if you plan on running several virtual machines, doing 3D modeling, and playing the latest PC games, you might care more about performance.

Before buying a laptop (or even a CPU for a desktop), you’ll probably want to look up actual benchmarks to see how the CPU stacks up compared to other CPUs in the real world. Actual benchmarks are the only really reliable way of comparing computer and CPU performance.


Speed isn’t everything when it comes to the modern laptop — battery life is also important. If a laptop performs well enough for you, it’s probably better to have a slower CPU that gets better battery life than a faster CPU you won’t notice.

上一篇:Python中sorted(iterable, *, key=None, reverse=False)函数参数定义中的独立星号(*)的含义


下一篇:Android系统启动流程(二)解析Zygote进程启动过程