# Panic with generic PAE kernel



## hackish (May 2, 2012)

I wanted my hosting provider to install some more RAM and they pointed out that I need to run FreeBSD 64 bit or PAE. Fearing too many incompatibilities I opted to try PAE as I won't have to recompile a number of specialized servers (that were written years before people dreamed of 64 bit processors...).

So I compiled and updated the system from 8.2-8.3. This booted fine with the GENERIC kernel. I then tried compiling the generic PAE kernel but on boot it panics immediately with kmem_suballoc error 3. The server has only 4GB installed at the moment but they will be installing an additional 4GB of RAM.

I am running ZFS.

/boot/loader.conf 

```
vm.kmem_size="1536M"
vm.kmem_size_max="1536M"
vfs.zfs.arc_max="80M"
vfs.zfs.vdev.cache.size="10M"
vfs.zfs.prefetch_disable=0
accf_http_load="YES"
accf_data_load="YES"
```

Any ideas?


----------



## hackish (May 2, 2012)

I've tried dozens of settings and finally found one that allowed it to boot with the PAE kernel.


```
vm.kmem_size="512M"
vfs.zfs.prefetch_disable=0
accf_http_load="YES"
accf_data_load="YES"
```

The majority of other things I tried just caused the kernel to panic. I believe in the future I will need to figure out some way to install the 64 bit version of FreeBSD on this server instead of the one I have. Difficult with no physical access.


----------



## SirDice (May 2, 2012)

Yes, I definitely recommend going 64 bit, especially in combination with ZFS. PAE is more or less a stop-gap. The extra memory won't do you any good either. Applications need to be specifically written to make use of PAE.


----------



## Terry_Kennedy (May 3, 2012)

hackish said:
			
		

> I wanted my hosting provider to install some more RAM and they pointed out that I need to run FreeBSD 64 bit or PAE. Fearing too many incompatibilities I opted to try PAE as I won't have to recompile a number of specialized servers (that were written years before people dreamed of 64 bit processors...)


FWIW, I have lots of software which was written years ago (some of it dates from the PDP-11) which compiles and runs fine on FreeBSD's amd64 platform. One of these has source files dating back to at least 1991, if not earlier (the former maintainer had a nasty habit of doing a [cmd=""]touch *[/cmd] for each release). It has needed a few tweaks evey now and again, but it still builds and runs.

There are some packages that I only have in binary form and which were built for 32-bit FreeBSD (or Linux) which also run fine on amd64.

Your biggest issue will probably be testing to ensure that your application still runs properly in the new environment. You'd need to do at least some of that testing when moving to a new FreeBSD version anyway.

PAE was a partial interim workaround for systems with more than 4GB. amd64 support has been in FreeBSD for years, and it gets a lot more developer attention than PAE. There are many devices which simply don't work in PAE mode and it is unlikely that PAE support will ever be added to them at this late date.


----------



## throAU (May 3, 2012)

As above, given the choice between PAE and x64, you'll probably find that x64 is more compatible and certainly likely to be more stable.


----------



## hackish (May 3, 2012)

Thanks for all the suggestions. I think I'm going to rehe*a*rse the in-place amd64 upgrade and then attempt it on the production server. The extra 4GB of RAM is being installed at the moment. Fortunately I have a system here with similar specs so I can practise the conversion. I wish there were an easier conversion procedure.


----------



## ATAG (Jun 5, 2012)

sys/i386/conf/NOTES:



> ```
> # Change the size of the kernel virtual address space.  Due to
> # constraints in loader(8) on i386, this must be a multiple of 4.
> # 256 = 1 GB of kernel address space.  Increasing this also causes
> ...


----------

