Subject: Re: Jerky/frozen mouse under load
To: Jakub Misak <>
From: None <>
List: netbsd-users
Date: 02/13/2005 03:42:05 wrote:
> Jakub Misak wrote:
>>> Are you running many memory hungry applications at the same time, like
>>> kde, firefox, thunderbird, gimp, etc. If you're running out of RAM and
>>> your machine is swapping, things can get pretty slow. You can see swap
>>> statistics by running 'swapctl -lk'
>> No, I was running only Xfce desktop, Firefox and xterm. It's not a 
>> memory issue, 512 MB RAM is more than enough for this.
> Do you know how to compile a custom NetBSD kernel? I'm thinking about a 
> few things you could try and see if that makes a difference. I'll gather 
> some info and post it in the next reply
OK try the following things to improve your system's performance:

1) Mount ffs filesystems (/, /usr, /var) with softdep option, i.e. edit 
your /etc/fstab e.g.

/dev/wd0a / ffs rw,softdep 1 1

This will mount root filesystem and enable softdep on it

2) Build custom kernel with optimisations. I assume you have NetBSD 
sources under /usr/src if not you can do cvs checkout, this will take a 
long time

cd /usr
export CVSROOT
cvs login #password is anoncvs
cvs checkout -P -rnetbsd-2 src

Save the following file as /etc/mk.conf

.ifdef BSD_PKG_MK

Create a custom kernel config file

cd /usr/src/sys/arch/i386/conf

Edit CUSTOM file and change options in the following way:

comment these lines:
#options        I386_CPU
#options        I486_CPU
#options        MATH_EMULATE    # floating point emulation

add this line:
options         HZ=1000

I believe HZ option will allow finer clock interrups, so multitasking 
should work better

Now build tools and custom kernel

cd /usr/src && ./ -m i386 \
	-O /usr/obj.i386_generic -T /usr/tools.i386_generic \
	tools \
&& cd /usr/src && ./ -u -m i386 \
	-O /usr/obj.i386_generic -T /usr/tools.i386_generic \

Save your current kernel as netbsd.orig, so that in case of any problems 
you could boot with your old kernel, e.g. 'boot hd0a:netbsd.orig' and 
copy newly built kernel in place of default kernel

mv /netbsd /netbsd.orig
cp /usr/obj.i386_generic/sys/arch/i386/compile/CUSTOM/netbsd /

Now reboot and see if you notice a difference.