December 2017
Beginner to intermediate
470 pages
12h 29m
English
R, as any programming language, is constrained by CPU, RAM, and I/O, and in this chapter, we focused on increasing the speed for the CPU part. However, considerable performance gains can be achieved by also making our RAM and I/O usage more efficient.
Measuring RAM (memory) usage is best done outside of R using the tools provided by your operating system for exactly this purpose. The information that these tools report varies depending on the operating system, but here are the key metrics you should keep an eye on: CPU usage, free memory, physical memory, swap size, and bytes read/written per second.
If you encounter high CPU utilization, the CPU is likely the main bottleneck for R's performance. Use ...