LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   FreeBSD running slow and I suspect it's something I did (https://www.linuxquestions.org/questions/%2Absd-17/freebsd-running-slow-and-i-suspect-its-something-i-did-278126/)

Clark Bent 01-15-2005 01:11 PM

FreeBSD running slow and I suspect it's something I did
 
Greetings fellow FreeBSD users. I installed FreeBSD 5.3 a while back on a machine and hadn't really used it much since...for a few months at least. However, recently I decided to pick up where I left off on this. I am noticing things are running fairly slow. And one of the last things I did prior to leaving the machine alone was recompile the kernel. And a while back, I seem to recall reading somewhere that if a person did not enable something in the kernel recompile, it would slow down performance, but I can't recall what it was or where I read it. I know it's not the machine. I have a 3.06 Ghz P4 with 1 GB of DDR. I really don't want to reinstall. Had hoped one of you might be kind enough to offer some suggestions.

$ uname -a
FreeBSD .xyz.net 5.3-BETA5 FreeBSD 5.3-BETA5 #2: Mon Oct 25 18:05:15 PDT 2004 root@.xyz.net:/usr/src/sys/i386/compile/MYKERNEL i386

Thanks in advance. Been out of the FreeBSD world for a little while. I'm a bit foggy. So if I have asked a question that has a obvious answer, I apologize.

-X- 01-15-2005 04:34 PM

First thing I would do is cvsup the source using RELENG_5_3, and rebuild everything using the GENERIC config. See the Handbook for the steps. Then cvsup the ports and portupgrade those. You're running an old beta.

Clark Bent 01-15-2005 04:59 PM

Appreciate the advice -X-. I did recently update my ports and did a portupgrade after. However, now that you mention it, I'm running cvsup again. After it is done, I'm going to rebuild world. That handbook does most certainly come in handy.

Clark Bent 01-15-2005 11:15 PM

Alright. Seems to have helped...not as much as I had hoped. But I do notice a difference. Interesting thing is:

$ uname -a
FreeBSD .xyz.net 5.3-BETA5 FreeBSD 5.3-BETA5 #0: Sat Jan 15 17:29:58 PST 2005 root@.xyz.net:/usr/obj/usr/src/sys/MYKERNEL i386

I had thought the whole "Beta 5" thing would have gone away. However, I am #0 now, instead of #2. Had never gone through that before (make buildworld..etc). It's always a suprise how easy things are in FreeBSD. Kernel compilation...syncing up your sources...it's always pleasant.

frob23 01-15-2005 11:19 PM

You didn't cvsup correctly if you are seeing BETA5 still. You should see FreeBSD 5.3-p4

What do you have in your supfile? Specifically, what is your tag?

Clark Bent 01-16-2005 12:17 AM

Had wondered about that...which is why I brought it up. from supfile:

# IMPORTANT: Change the next line to use one of the CVSup mirror sites
# listed at http://www.freebsd.org/doc/handbook/mirrors.html.
*default host=cvsup10.us.freebsd.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_5_3
*default delete use-rel-suffix

frob23 01-16-2005 12:41 AM

*default release=cvs tag=RELENG_5_3

I would break this into two lines:
*default release=cvs
*default tag=RELENG_5_3

And redo the cvsup. How did you do the make world and all. I recommend the following.

# make buildworld
# make kernel ---- this will default GENERIC which you want
# make installworld
# mergemaster

Then reboot.

Clark Bent 01-16-2005 12:49 AM

Thanks for the quick response. Much appreciated. Giving your advice a go now. Will report back shortly.

Clark Bent 01-16-2005 02:09 AM

Strange. Well, there is no question that I see a change in performance. However, uname still has pretty much the same output:

FreeBSD .xyz.net 5.3-BETA5 FreeBSD 5.3-BETA5 #1: Sat Jan 15 23:47:42 PST 2005 root@.xyz.net:/usr/obj/usr/src/sys/MYKERNEL i386

I do notice one key difference between your recommended course of action and the method I have used. After the steps you mentioned (in which I have used a preconfigured kernel file) I:

reboot
mergemaster -p
make installworld
mergemaster
reboot again

I left defaults on mergemaster and I am starting to think that is why uname has the same output.

-X- 01-16-2005 04:32 AM

First thing, I don't live on this thing! Usually get up about 4:30, check things while getting a little java, before going out out for a jog! :)

Anyway, should have gotten rid of the beta debug stuff which will speed things up. That 'MYKERNEL' thing bugs me. I don't think mergemaster has an effect.

Look in your /usr/src/UPDATING just to make sure you have the latest. Try the below and reboot and report back. That should use the GENERIC config.

Procedure 2. Building a Kernel the ``New'' Way
Change to the /usr/src directory.
# cd /usr/src
Compile the kernel.
# make buildkernel
Install the new kernel.
# make installkernel

Clark Bent 01-16-2005 10:32 AM

Your routine is similar to mine -X- minus the jog. And again, appreciate the help. They "MYKERNEL" deal is due to me using my own custom kernel. For /usr/src//UPDATING

make buildkernel KERNCONF=YOUR_KERNEL_HERE
make installkernel KERNCONF=YOUR_KERNEL_HERE

This is where I had utilized my prior customer kernel configuration (called MYKERNEL...called such from following the example in the handbook verbatim for creating your own custom kernel).

I can use the GENERIC config. Matter of fact, during our little go about here I did once. I still had the whole beta thing and my sound card did not work, so I went back to using the configuration I had made prior (using generic as my example and just editing as needed for atapicam and sound).

However, I'm willing to give it another try. Rather enjoying the experimenatation really. However, I have not fully engaged in my own routine here. In other words, I haven't had any coffee and I'm hungry.

4:30 on weekends? Wow. You have me beat there. I won't get up that early even when I go to work.

-X- 01-16-2005 11:00 AM

Don't know why and never had any problems with sound on previous versions, but I did with 5.3. The kldload would load it (can't remember now) in a wrong order of kldstat, and compiling in the kernel didn't help.

Ended up with /usr/local/etc/rc.d/start.sh script.
#!/bin/sh
# start
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
echo "Starting sound ...................."
kldload sound
kldload snd_mss
elif [ "x$1" = "xstop" ]; then
# never got this done.
fi

Anyway, that beta thing sounds like it is coming from your 'old' 5.3-beta kernel config. Other than that, post back and we'll look around.

Got some real gurus around here that can solve anything.

frob23 01-16-2005 11:07 AM

The BETA5 is found in /usr/src/sys/conf/newvers.sh

For some reason the cvsup is not working.

Clark Bent can you run "head -n 20/usr/src/UPDATING" and post the 20 lines you get here? Just as a sanity check.

Edit: That file (newvers.sh) is updated when a version is changed in any way... and it propagates the proper tags throughout the kernel source. Currently it should have
Code:

TYPE="FreeBSD"
REVISION="5.3"
BRANCH="RELEASE-p5"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"

somewhere in it. But I am betting it doesn't.

Clark... this is NOT the file you are checking... so your output will not look like this. I'm checking an easier file to see if the tree is up to date.

-X- 01-16-2005 12:27 PM

Yeah, that's a good idea checking both files.

Just for grins, here's my os sup file which always works, just change the tag.

*default host=cvsup10.FreeBSD.org
*default base=/usr
*default prefix=/usr
*default release=cvs tag=RELENG_5_3
*default delete use-rel-suffix
# If you seem to be limited by CPU rather than network or disk bandwidth, try
# commenting out the following line. (Normally, today's CPUs are fast enough
# that you want to run compression.)
*default compress
## Main Source Tree.
#
# The easiest way to get the main source tree is to use the "src-all"
# mega-collection. It includes all of the individual "src-*" collections.
# Please note: If you want to track -STABLE, leave this uncommented.
src-all

Note:
Seeing this, make sure you have the src-all.

Clark Bent 01-16-2005 12:43 PM

Interesting. Well here we go:

$ head -n 20 /usr/src/UPDATING
Updating Information for FreeBSD current users

This file is maintained and copyrighted by M. Warner Lo
sh
<imp@village.org>. See end of file for further details
. For commonly
done items, please see the COMMON ITEMS: section later
in the file.

Items affecting the ports and packages system can be fo
und in
/usr/ports/UPDATING. Please read that file before runn
ing
portupgrade. Important recent entries: 20040724 (defau
lt X changes).

20040914:
The format of the pflogd(8) logfile "/var/log/pflog" has changed for
architectures that have a 64 bit long type to make it compatible to
the standard pcap format. In order to prevent corruption move away
any old logfile before using a new pflogd(8).

20040913:
debug.witness_* has been renamed to debug.witness.*. There are
compatibility tunables left in for a few days. Update loader.conf
as necessary.


All times are GMT -5. The time now is 09:57 AM.