Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Dec 2004 06:48:42 -0600
From:      Nikolas Britton <freebsd@nbritton.org>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Old Computers, -Os, Stripping, and 4-STABLE
Message-ID:  <41C032AA.4000606@nbritton.org>

next in thread | raw e-mail | index | archive | help
Hello,

I have an old laptop (P100 / 40MB RAM / 40GB hdd) that I'm trying to 
squeeze every last drop of performance out of and I like some advice on 
things I can do. Currently It's running 4.10-STABLE with a kernel that 
has been striped clean of all the useless crud, also I add in sound 
support and VESA/SC_PIXEL_MODE as this computer is a text based 
workstation (X is not installed).  There's really only a few things 
currently that I use it for:  use it to ssh into my private network at 
home, use it as a calculator (calc), use it as a Pizza / Egg Timer 
(custom perl script), and use it for network diagnostics... but what I'd 
like to do is use it as a mobile jukebox for playing all my mp3s when 
I'm on the road (possibly even convert it into a onboard car mp3 player) 
or away from home. the problem is that's its so slow that when I play 
music on it (mp3blaster) and try to do anything else on it (even just 
logging in on another virtual console) the sound starts skipping, 
looking at top shows about .8 - 1 for the load. Id still like to use it 
as a general workstation so nothing too radical....

1. I'd like to know if it's (relatively) safe to use -Os for CFLAGS and 
COPTFLAGS?

2. I'd like to know what background stuff/daemons/etc that can be safely 
striped out, sendmail?, etc?

3. Is there anyway to optimize the system for decoding / playing mp3s?

4. Give mp3 playback a high priority and more cpu time in the system so 
it doesn't skip as much, auto reniceing?

5. Optimize sound device resources, buffersize, dma, targetirqrate, etc 
for mp3 playback?

6. Any other tips to improve performance?

7. Is there anything else I can safely strip out of my kernel (or add) 
that will improve performance?

here is a copy of my kernel config file:

machine        i386
cpu        I586_CPU
ident        STUMBLEINE_01
maxusers    0

options        PNPBIOS
options     INET            #InterNETworking
options     FFS            #Berkeley Fast Filesystem
options     FFS_ROOT        #FFS usable as root device [keep this!]
options     SOFTUPDATES        #Enable FFS soft updates support
options     UFS_DIRHASH        #Improve performance on big directories
options     MFS            #Memory Filesystem
#options     MD_ROOT            #MD is a potential root device
#options     NFS            #Network Filesystem
#options     NFS_ROOT        #NFS usable as root device, NFS required
#options     MSDOSFS            #MSDOS Filesystem
#options     CD9660            #ISO 9660 Filesystem
#options     CD9660_ROOT        #CD-ROM usable as root, CD9660 required
options     PROCFS            #Process filesystem
options     COMPAT_43        #Compatible with BSD 4.3 [KEEP THIS!]
options     UCONSOLE        #Allow users to grab the console
options     USERCONFIG        #boot -c editor
options     VISUAL_USERCONFIG    #visual boot -c editor
options     KTRACE            #ktrace(1) support
options     SYSVSHM            #SYSV-style shared memory
options     SYSVMSG            #SYSV-style message queues
options     SYSVSEM            #SYSV-style semaphores
options     P1003_1B        #Posix P1003_1B real-time extensions
options     _KPOSIX_PRIORITY_SCHEDULING
options     ICMP_BANDLIM        #Rate limit bad replies
options     KBD_INSTALL_CDEV    # install a CDEV entry in /dev
                    # output.  Adds ~215k to driver.
device        isa
device        pci

# Floppy drives
device        fdc0    at isa? port IO_FD1 irq 6 drq 2
device        fd0    at fdc0 drive 0
device        fd1    at fdc0 drive 1

# ATA and ATAPI devices
device        ata0    at isa? port IO_WD1 irq 14
device        ata1    at isa? port IO_WD2 irq 15
device        ata
device        atadisk            # ATA disk drives
device        atapicd            # ATAPI CDROM drives
options     ATA_STATIC_ID        #Static device numbering

# SCSI peripherals
device        scbus        # SCSI bus (required)
device        da        # Direct Access (disks)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device        atkbdc0    at isa? port IO_KBD
device        atkbd0    at atkbdc? irq 1 flags 0x1
device        psm0    at atkbdc? irq 12

# Video options
device        vga0    at isa?
options        VESA
options        SC_PIXEL_MODE

# splash screen/screen saver
pseudo-device    splash

# syscons is the default console driver, resembling an SCO console
device        sc0    at isa? flags 0x100

# Floating point support - do not disable.
device        npx0    at nexus? port IO_NPX irq 13

# Power management support (see LINT for more options)
device        apm0    at nexus? disable flags 0x20 # Advanced Power 
Management

# PCCARD (PCMCIA) support
device        card
device        pcic0    at isa? irq 0 port 0x3e0 iomem 0xd0000
device        pcic1    at isa? irq 0 port 0x3e2 iomem 0xd4000 disable

# Serial (COM) ports
device        sio0    at isa? port IO_COM1 flags 0x10 irq 4
device        sio1    at isa? port IO_COM2 irq 3
device        sio2    at isa? disable port IO_COM3 irq 5
device        sio3    at isa? disable port IO_COM4 irq 9

# Parallel port
device        ppc0    at isa? irq 7
device        ppbus        # Parallel port bus (required)
device        lpt        # Printer
device        plip        # TCP/IP over parallel
device        ppi        # Parallel port interface device

# ISA/PCMCIA Ethernet NICs.
device        miibus        # MII bus support
device        ed0    at isa? disable port 0x280 irq 10 iomem 0xd8000
device        ep
device        fe0    at isa? disable port 0x300
device        xe

# PRISM I IEEE 802.11b wireless NIC.
device        awi
# WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really
# exists only as a PCMCIA device, so there is no ISA attachment needed
# and resources will always be dynamically assigned by the pccard code.
device        wi
# Aironet 4500/4800 802.11 wireless NICs. Note: the declaration below will
# work for PCMCIA and PCI cards, as well as ISA cards set to ISA PnP
# mode (the factory default). If you set the switches on your ISA
# card for a manually chosen I/O address and IRQ, you must specify
# those parameters here.
device        an

# The probe order of these is presently determined by i386/isa/isa_compat.c.
#device        ie0    at isa? disable port 0x300 irq 10 iomem 0xd0000
#device        le0    at isa? disable port 0x300 irq 5 iomem 0xd0000
#device        lnc0    at isa? disable port 0x280 irq 10 drq 0
#device        cs0    at isa? disable port 0x300
device        sn0    at isa? disable port 0x300 irq 10

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device    loop        # Network loopback
pseudo-device    ether        # Ethernet support
#pseudo-device    sl    1    # Kernel SLIP
pseudo-device    ppp    1    # Kernel PPP
pseudo-device    tun        # Packet tunnel.
pseudo-device    pty        # Pseudo-ttys (telnet etc)
pseudo-device    md        # Memory "disks"

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device    bpf        #Berkeley packet filter

device        pcm        # Generic Sound Support
device         sbc0 at isa? port 0x220 irq 10 drq 1





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41C032AA.4000606>