Linux 32bit PAE kernel with more than 8 cores

It’s not entirely obvious how to do this, but it can be done if you compile your own kernel. The trick is enabling BIGSMP before you select the number of CPUs.  If you don’t, you’ll get an error saying more than 8 cores is an invalid option.

Kernel compilation instructions for Ubuntu are here: https://help.ubuntu.com/community/Kernel/Compile

When it comes time to set kernel configuration parameters, make sure to select:

CONFIG_X86_PAE=y
CONFIG_X86_32_SMP=y
CONFIG_X86_BIGSMP=y
CONFIG_NR_CPUS=32