Is integrated VRAM included under `kernel_task` RAM in Activity Monitor?

Solution 1:

What version of Mac OS X are you running?

The kernel_task in Mac OS X 10.9 Mavericks takes 1.07 GB of RAM on my 2012 MacBook Pro (non-Retina) with Intel HD4000 integrated graphics and 16GB of system RAM. Yes, this is completely necessary. If you have more physical RAM, then Mac OS X will use a lot for kernel_task in order to make the system run optimally.

With each new version of Mac OS X over the years, the kernel_task has taken more and more memory to run Mac OS X.

In my experience, if you are running Mac OS X 10.8 Mountain Lion, your Mac needs to have more than 4GB of system RAM to run optimally (without the OS needing to use the swapfile on the hard disk constantly, which degrades performance speed). It now appears that your Mac needs more than 6GB RAM to run Mac OS X 10.9 Mavericks effectively.

The amount of RAM needed for Microsoft Windows 8.0 and 8.1 are comparable. This is simply what is required for the newest personal computer operating systems in 2013.

Please note that many system functions run under kernel_task, and the list of what is running on your Mac changes based on what you are using your Mac for.

I found a good explanation for you, in "Kernel_task taking up RAM in OS X" from CNet in 2011. A quote:

...you will see another process called "kernel_task" that also will regularly use a few hundred megabytes of real RAM and seem to increase its RAM footprint with system usage.

The kernel in OS X is the software architecture that is responsible for handling resources that processes and programs need. These include the management of multitasking scheduling, virtual memory, system input and output, and various communication routines between processes. In addition, the kernel can be modified and given enhanced functionality by loading kernel extensions (kexts) to supply system-level management of features like Bluetooth and Wi-Fi, graphics processors, third-party hardware, access to peripheral devices, and special filesystem support. In essence, the kernel is responsible for running your hardware and making the hardware resources available to applications and system services.

...the process "kernel_task" may take up a large amount of system memory. When the system starts up, even though you may have kernel extensions loaded, not all of the services are active. The system may be ready to use them, but will not load them fully until needed. Therefore, if you initially start up your system and check Activity Monitor, you may see the kernel_task process taking up a relatively small amount of RAM. When you then start using your system and activating features like your iSight camera, Wi-Fi services, switching GPUs, and using external devices, then the kernel_task will make use of the resources for these devices and will grow in size.

Solution 2:

I guess, it is included. I have a MBP 13" 2015 with Iris, and the kernel_task that takes a lot of memory as well, I was investigating the situation and I've discovered a marvellous zprint command. It prints kernel memory zones usage, I see 2 entries taking most of the memory for me:

  • com.apple.iokit.IOAcceleratorFamily2 - 758044K
  • vm.pages.array - 221204K

Sadly, I failed to found reliable information on the IOAcceleratorFamily2 (and failed to find any information on vm.pages.array), but the name suggests it has to do something with I/O and acceleration. From that info I guess, it's part of the memory, that is responsible for video acceleration and is dedicated for the Iris's image processing needs.

I did a little test, starting a screen recording and two 4K youtube videos in parallel: com.apple.iokit.IOAcceleratorFamily2 rose to 1.1G in a matter of seconds, and after I stopped the recording and the videos, it fell down to 630M. Thus, I think, it's very likely, that it is responsible for VRAM.