Subject: Re: Jerky/frozen mouse under load
To: Jakub Misak <jmisak@atlas.cz>
From: None <sigsegv@rambler.ru>
List: netbsd-users
Date: 02/13/2005 03:42:05
sigsegv@rambler.ru 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
CVSROOT=:pserver:anoncvs@anoncvs.netbsd.org:/cvsroot
export CVSROOT
cvs login #password is anoncvs
cvs checkout -P -rnetbsd-2 src
Save the following file as /etc/mk.conf
OPTIM_FLAGS=-O2
.ifdef BSD_PKG_MK
COPTS+=${OPTIM_FLAGS}
CFLAGS+=${OPTIM_FLAGS}
CXXFLAGS+=${OPTIM_FLAGS}
.else
COPTS+=${OPTIM_FLAGS}
.endif
Create a custom kernel config file
cd /usr/src/sys/arch/i386/conf
cp GENERIC CUSTOM
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 && ./build.sh -m i386 \
-O /usr/obj.i386_generic -T /usr/tools.i386_generic \
tools \
&& cd /usr/src && ./build.sh -u -m i386 \
-O /usr/obj.i386_generic -T /usr/tools.i386_generic \
kernel=CUSTOM
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.