2 ms·
Kernel does not load 43 MB. It maps file to memory and then executes it from start address. During execution, kernel paging mechanism reads parts of the file in
by vbezhenar 4y ago
Kernel does not load 43 MB. It maps file to memory and then executes it from start address. During execution, kernel paging mechanism reads parts of the file into memory as CPU touches it. So ideally this print algorithm should take few kilobytes of those 43 MB and 2-3 pages loaded from the disk. With SSD it should be significantly faster than 130 ms.
What exactly happens with kubectl is hard to answer and need someone to profile it if that's true. May be it checks for updates or something like that.