Re: Performance degradation over time on VAX...
Ken Wellsch <[email protected]> Wed, 15 Jul 2026 12:27:28 +0000
| Newsgroups | gmane.os.netbsd.ports.vax |
|---|---|
| Message-ID | <CH2P223MB12762776E7EA04CA3E86B91EBEF82@CH2P223MB1276.NAMP223.PROD.OUTLOOK.COM> |
After some thought, I realized that my data copy overhead was not a good on= e.=0A= =0A= When I ran "dd if=3D/dev/rsd0c of=3D/dev/null bs=3D1m count=3D200" on the v= s4k60,=0A= the times were consistent from 4.0.1 to 11rc5 (all around 76 seconds).=0A= =0A= So I asked this question on Google:=0A= =0A= Why does the Unix dd command run slower with a small block size?=0A= =0A= Here is a portion of the response:=0A= =0A= 1. High System Call (Syscall) Overhead=0A= =0A= Every time dd reads or writes a block of data, it must execute a=0A= read() and a write() system call.=0A= =0A= Context Switching: Each system call forces the CPU to switch context=0A= from user space to kernel space and back.=0A= =0A= The Cost: If you transfer a 10 GB file using the default 512-byte=0A= block size, dd must perform roughly 40 million system calls. If you=0A= use bs=3D4M, it requires only 2,500 system calls. Minimizing this=0A= context-switching overhead dramatically increases throughput.=0A= =0A= I see that "lmbench" includes several tests related to system call=0A= overhead as well as context switching. So that looks like a good=0A= tool to try (plus it covers a broad range of topics).=0A= =0A= Thank you for the suggestion!=0A=