ฝึกพูดภาษาอังกฤษด้วยเทคนิค Shadowing จากวิดีโอ: System Design: Why is Kafka fast?

กำลังโหลด...
1
Why is Kafka fast?
2
What is the secret?
3
We will talk about it in this video.
4
Let's dive right in.
5
We'll first start by acknowledging that the term fast is ambiguous.
6
What does it even mean that Kafka is fast?
7
Are we talking latency?
8
Are we talking throughput?
9
Is fast compared to what?
10
Kafka is optimized for high throughput.
11
It is designed to move a large number of records in a short amount of time.
12
Think of it as a very large pipe moving liquid.
13
The bigger the diameter of the pipe, the larger the volume of liquid that can move through it.
14
So when someone says Kafka is fast, they usually refer to Kafka's ability to move a lot of data efficiently.
15
What are some of the design decisions that help Kafka move a lot of data quickly?
16
There are many design decisions that contributed to Kafka's performance.
17
In this video, we'll focus on two.
18
We think these two carry the most weight.
19
The first one is Kafka's reliance on sequential I.O.
20
What is sequential I.O.?
21
Let's dig deeper into that.
22
There's a common misconception that disk access is slow compared to memory access.
23
But this largely depends on data access patterns.
24
There are two types of disk access patterns, random and sequential.
25
For hard drives, it takes time to physically move the arm to different locations on the magnetic disks.
26
This is what makes random access slow.
27
For sequential access though, since the arm doesn't need to jump around it is much faster to read
28
and write blocks of data one after the other kafka takes
29
advantage of this by using an append only log as its primary data structure
30
and the pen only log adds new data to the end
31
of the file this access pattern is sequential now let's bring
32
this idea home with some numbers on modern hardware with an
33
array of this hard disks sequential will write reach hundreds of megabytes per second,
34
while random writes are measured in hundreds of kilobytes per second.
35
Sequential access is several order of magnitude faster.
36
Using hard disks has its cost advantage too.
37
Compared to SSD, hard disks come as one-third of the price, but with about three times the capacity.
38
Giving Kafka a large pool of cheap disk space without any performance penalty, means that Kafka can cost-effectively retain messages for a long period of time,
39
a feature that was uncommon to messaging systems before Kafka.
40
The second design choice that gives Kafka its performance advantage is its focus on efficiency.
41
Kafka has moved a lot of data from network to disk and then from disk to network.
42
It is critically important to eliminate excess copy when moving pages and pages of data between the disk and the network.
43
This is where zero copy principle comes into the picture.
44
Modern Unix operating systems are highly optimized to transfer data from disk to network without copying data excessively.
45
Let's dive deeper to see how this is done.
46
First, we look at how Kafka sends a page of data on disk to the consumer
47
when zero copy is not used at all.
48
First, the data is loaded from disk to the OS cache.
49
Second, the data is copied from the OS cache into the Kafka application.
50
Third, the data is copied from Kafka to the socket buffer.
51
And fourth, the data is copied from the socket buffer to the network interface card buffer.
52
And finally, the data is sent over the network to the consumer.
53
Now this is clearly inefficient.
54
There are four copies and two system calls.
55
Now let's compare this to zero copy.
56
The first step is the same.
57
The data page is loaded from the disk to the OS cache.
58
With zero copy, the Kafka application uses a system call called send file to
59
tell the operating system to directly copy the data from the OS cache to the network interface card buffer.
60
In this optimized path, the only copy is from the OS cache into the network card buffer.
61
With a modern network card, this copying is done with DMA.
62
DMA stands for Direct Memory Access.
63
When DMA is used, the CPU is not involved, making it even more efficient.
64
To recap, sequential I.O and zero copy principle are the cornerstone to Kafka's high performance.
65
Kafka uses other techniques to squeeze every ounce of performance of modern hardware, but these two are the most important in our view.
66
If you'd like to learn more about system design, check out our books and weekly newsletter.
67
Please subscribe if you learned something new.
68
Thank you so much and we'll see you next time.

ความประทับใจแรก

วิดีโอนี้นำเสนอเนื้อหาที่น่าสนใจเกี่ยวกับการออกแบบระบบ โดยเฉพาะการพูดคุยเกี่ยวกับความเร็วของ "Kafka" ทำให้ผู้เรียนภาษาอังกฤษสามารถฝึกฟังได้อย่างมีประสิทธิภาพ เนื้อหาที่ซับซ้อนยังถูกอธิบายด้วยภาษาที่เข้าใจง่าย ซึ่งเป็นคุณสมบัติที่ดีสำหรับการพัฒนา "shadowspeaks" หรือ การฝึกพูดตามเสียง เพื่อปรับปรุงการออกเสียงภาษาอังกฤษ

วิเคราะห์ประโยค

ลองมาดูประโยคที่น่าสนใจในวิดีโอนี้:

  • “Kafka is optimized for high throughput.” - ประโยคนี้สั้นและตรงไปตรงมา ทำให้ผู้ฟังเข้าใจได้ง่ายว่าจุดเด่นของ Kafka คือการจัดการข้อมูลจำนวนมากได้อย่างมีประสิทธิภาพ
  • “For sequential access, the arm doesn't need to jump around.” - การใช้คำว่า "jump around" สร้างภาพที่ชัดเจนให้กับผู้ฟัง และช่วยให้เข้าใจถึงข้อดีของการเข้าถึงข้อมูลแบบลำดับ
  • “Using hard disks has its cost advantage too.” - ประโยคนี้ชัดเจนเกี่ยวกับข้อดีด้านต้นทุน ซึ่งเป็นสิ่งที่ผู้เรียนสามารถนำไปใช้ในบริบทอื่น ๆ ได้

การใช้ภาษาที่เรียบง่ายและตรงไปตรงมาทำให้การสนทนาฟังดูเป็นธรรมชาติ และน่าเรียนรู้สำหรับผู้ที่ต้องการปรับปรุงการออกเสียงภาษาอังกฤษ

กิจวัตรการฝึก

ในการฝึกฝนการออกเสียงภาษาอังกฤษจากวิดีโอนี้ คุณสามารถทำตามขั้นตอนง่ายๆ ดังต่อไปนี้:

  1. ฟังวิดีโอครั้งแรกเพื่อทำความเข้าใจเนื้อหา
  2. ฟังอีกครั้งและลองพูดตามเสียงที่คุณได้ยิน (shadow speech)
  3. บันทึกเสียงของคุณขณะพูดตามและเปรียบเทียบกับเสียงต้นฉบับ
  4. ทำซ้ำขั้นตอนนี้หลายๆ ครั้งเพื่อพัฒนา "การออกเสียงภาษาอังกฤษ" ของคุณให้ดีขึ้น

การทำตามกิจวัตรนี้จะช่วยให้คุณคุ้นเคยกับโครงสร้างประโยคและการออกเสียงในบริบทที่ต่างกัน ทำให้การเรียนรู้ภาษาอังกฤษเป็นเรื่องสนุกและมีประสิทธิภาพมากยิ่งขึ้น

เทคนิค Shadowing คืออะไร?

Shadowing เป็นเทคนิคการเรียนรู้ภาษาที่ได้รับการรับรองทางวิทยาศาสตร์ พัฒนาขึ้นสำหรับการฝึกนักแปลมืออาชีพ วิธีการนี้เรียบง่ายแต่ทรงพลัง: คุณฟังเสียงภาษาอังกฤษจากเจ้าของภาษาและพูดตามทันที — เหมือนเงาที่ตามผู้พูดด้วยช่วงเวลาห่าง 1-2 วินาที การวิจัยแสดงว่าเทคนิคนี้ปรับปรุงความแม่นยำในการออกเสียง ทำนองเสียง จังหวะ การเชื่อมเสียง การฟังเข้าใจ และความคล่องแคล่วในการพูดได้อย่างมีนัยสำคัญ