In the past, I've experienced odd memory consumption issues after upgrading OS X, due to older kernel extensions that were still being loaded. Some of the extensions were for applications that I was no longer using and had forgotten about. You might try listing out all the non apple kernel extensions, then try unloading them one by one to see if you experience any improvement in memory consumption.
To list what is loaded, type the following from a terminal shell:
kextstat | grep -v com.apple
So, each of the kernel extensions, will have a corresponding kext file, located in the default /System/Library/Extensions/.
Then, to unload a kernel extension, type the following:
sudo kextunload /System/Library/Extensions/<NAME_OF_KEXT_File.kext>
If you identify any extensions that are wonky, you then have a starting place to see if perhaps there is an updated version of the application that is more Lion friendly.
I know your post is from a while back, but if this is still an issue, try my suggestions in this post. If those don't work, D.W. posted some other useful links in his comments.
Hope you get this worked out :)
Vlad
Best Answer
The kernel task is special since it's an entire operating system / micro kernel based on Mach 3.0. It abstracts most of the core hardware, timing, message passing and memory handling.
What most people notice in Activity Monitor is that
kernel_task
accumulates all the CPU time for input/output (i/o) processing delays and calculations as well as scheduling overhead of processes and threads. Similarly - it accumulates all memory allocations that are not in the user space. On the 2014 and newer Macs, this task exists to throttle the CPU - when the temperatures in the processor are too warm, kernel task is assigned "no work" and shows high CPU busy to let the processor idle and not overheat the computer. This is most noticeable on the portable line - especially the MacBook without any sort of fan or blower to cool the processor. Apple warns of this to potential kernel programmers in "Why you should stay away from programming in the Kernel" that disabling cooling will cause permanent irreparable hardware damage.If you watch it after a reboot you will see it starts with minimal RAM and CPU needs and instead grows only when other programs run and need the system services.
To slim it down, shut off unneeded ports (WiFi, bluetooth, etc... ) as well as idle / unused programs. If things don't settle down, consider rebooting to ensure no task is stuck or leaking memory. If you have programs doing real work, they will cause the kernel to use both memory and processor time - just watch as you start things to see which other programs are causing this behavior. It's rarely an issue with the kernel - even with badly performing programs - that can't be solved by logging out and back in again. The kernel_task cleans up well and generally takes care to only use the resources needed by the workload.