# BSD is low-performance than XP! HOWTO Improve ?



## FreeJX (Mar 25, 2010)

Hi,

Any suggestion to improve the performance in BSD ? I found that it's exactly much lower than XP, which could be switched. 

'Coz Im a newer, so it's better to show me some ways to learn this.


----------



## foldingstock (Mar 25, 2010)

FreeJX, what kind of hardware are you running? Can you provide some examples of how XP is faster?


----------



## FreeJX (Mar 25, 2010)

It's Intel P4 with 1 G memory.
For an example, Firefox runs slowly and it's the same as to refresh the pages.


----------



## vermaden (Mar 25, 2010)

@FreeJX

Firefox itself is a lot slower on anything other then Windows, try Opera.


----------



## FreeJX (Mar 25, 2010)

Ignore Firefox.

I still feel the system performance is not good as my expect. Do you have some advices ?


----------



## vermaden (Mar 25, 2010)

@FreeJX

Tell EXACLY what is slower.


----------



## gcooper@ (Mar 25, 2010)

If would help if you provided more details as well, like what version of FreeBSD you're running, what you're doing when you see the performance drop, etc.


----------



## adamk (Mar 25, 2010)

And don't forget to tell us what hardware you are using.  If you don't have 2D acceleration with Xorg, things can feel very slow.

Adam


----------



## DutchDaemon (Mar 25, 2010)

What is 'the system performance'? Video? Disk? Network? Boot time? Making toast?


----------



## Beastie (Mar 25, 2010)

Define performance and/or give examples.
Firefox is quite slow as vermaden said, and as he recommended you can try Opera.

The machine I use as my desktop is a PIV too, but it has a 384MB memory! and Opera starts and operates very fast. I haven't tried to time it against the Windows version, but it seems to have a very similar performance.
All the applications I use are lightweight, run fast and have relatively low memory footprints. The system itself takes 30-35 seconds to start (delays/countdowns included) from bootup to login, compared to 45 seconds to +1 minute for Windows 2000. FreeBSD is faster and more responsive in every way compared even to Windows 95 or 98SE.
The only thing that is slower is graphics redrawing. That's because I had to disable all hardware acceleration due to lockups, but this is _mostly_ related to Xorg, not FreeBSD.


----------



## FreeJX (Mar 26, 2010)

Sorry, actually I'm not clear what exactly to make the system slow. So I can't tell what it is. I just feel that the web page loading much slower in Firefox, even in Opera it's better, but it's still slow, comparing the feeling in WinXP. 

I don't know what and why made this.
My status now is FreeBSD 8.0 standard installed, no kernel and anything else customization (Not study yet),  and I'm installing the ports with configuration following the handbook.
The exact what I wanna know is how to speed up on surfing the web as it could be in WinXP.


----------



## Zare (Mar 26, 2010)

Post the contents of following files;


```
/etc/rc.conf
/etc/X11/xorg.conf
```

And the output of following commands;


```
dmesg
xdpyinfo
```

And tell us what desktop environment / window manager are you running, plus the exact brand / model of your graphics adapter.

I'm running FreeBSD 8 on Toshiba Satellite Pro M10 (P4M 1.6GHz / 2 GB RAM / nVidia GF4GO 32MB, slow ATA-100 5400RPM 80GB HDD) and the system behaves way better than Windows XP. The initial state after boot into Xorg may feel a bit slower on response than XP, but when you load it with some real work...boy does BSD bliss over XP there.


----------



## kpedersen (Mar 26, 2010)

I found when I used to use Gnome, the whole thing felt really sluggish. The Windows XP shell is much lighter and faster in comparison, so perhaps use something like Xfce4 or JoeWM.


----------



## fronclynne (Mar 27, 2010)

Windows is hella fast.  I just ran `# nice -n 20 make buildworld` on Windows and it gave me a new command prompt in less than one second.  That is fast.


----------



## FreeJX (Mar 27, 2010)

Thanks a lot, Zare.

The window manager is Xfce4 and FreeBSD 8.0 runs on hp compaq (Pentium(R) 4 CPU 2.60GHz / 1 G Memory / Intel 82865G (865G GMCH) SVGA controller). Xorg and Xfce4 are just initialized. I'm learning how to make the hardwares work really.


----------



## FreeJX (Mar 27, 2010)

For /etc/rc.conf


```
# -- sysinstall generated deltas -- # Sat Mar 20 08:48:05 2010
# Created: Sat Mar 20 08:48:05 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="jerry.xu.net"
ifconfig_bge0="DHCP"
inetd_enable="NO"
keymap="us.iso"
nfs_client_enable="YES"
sshd_enable="YES"
hald_enable="YES"
dbus_enable="YES"

fusefs_enable="YES"
```


----------



## FreeJX (Mar 27, 2010)

For /etc/X11/xorg.conf


```
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/lib/X11/fonts/misc/"
        FontPath     "/usr/local/lib/X11/fonts/TTF/"
        FontPath     "/usr/local/lib/X11/fonts/OTF"
        FontPath     "/usr/local/lib/X11/fonts/Type1/"
        FontPath     "/usr/local/lib/X11/fonts/100dpi/"
        FontPath     "/usr/local/lib/X11/fonts/75dpi/"
        FontPath     "/usr/local/lib/X11/fonts/URW/"
        FontPath     "/usr/local/lib/X11/fonts/TrueType/"
EndSection

Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "dri2"
        Load  "extmod"
        Load  "glx"
        Load  "record"
        Load  "freetype"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        Modeline     "1680x1050" 119.00 1680 1728 1760 1840 1050 1053 1059 1080
        Option       "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"                   # [<bool>]
        #Option     "SWcursor"                  # [<bool>]
        #Option     "ColorKey"                  # <i>
        #Option     "CacheLines"                # <i>
        #Option     "Dac6Bit"                   # [<bool>]
        #Option     "DRI"                       # [<bool>]
        #Option     "NoDDC"                     # [<bool>]
        #Option     "ShowCache"                 # [<bool>]
        #Option     "XvMCSurfaces"              # <i>
        #Option     "PageFlip"                  # [<bool>]
        Identifier  "Card0"
        Driver      "intel"
        VendorName  "Intel Corporation"
        BoardName   "82865G Integrated Graphics Controller"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes     "1680x1050"
        EndSubSection
EndSection
```


----------



## FreeJX (Mar 27, 2010)

```
$ dmesg 
Copyright (c) 1992-2009 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009
    [email]root@almeida.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 2.60GHz (2593.51-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNXT-ID,xTPR>
real memory  = 1074266112 (1024 MB)
avail memory = 1028091904 (980 MB)
ACPI APIC Table: <COMPAQ SPRINGD >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 HTT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP/HT): APIC ID:  1
ioapic0: Changing APIC ID to 1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <COMPAQ CPQ0064> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 3f700000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xf808-0xf80b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x14e0-0x14e7 mem 0xf0000000-0xf7ffffff,0xfc400000-0xfc47ffff irq 16 at device 2.0 on pci0
agp0: <Intel 82865G (865G GMCH) SVGA controller> on vgapci0
agp0: detected 8060k stolen memory
agp0: aperture size is 128M
uhci0: <Intel 82801EB (ICH5) USB controller USB-A> port 0x1440-0x145f irq 16 at device 29.0 on pci0
uhci0: [ITHREAD]
uhci0: LegSup = 0x0020
usbus0: <Intel 82801EB (ICH5) USB controller USB-A> on uhci0
uhci1: <Intel 82801EB (ICH5) USB controller USB-B> port 0x1460-0x147f irq 19 at device 29.1 on pci0
uhci1: [ITHREAD]
uhci1: LegSup = 0x0020
usbus1: <Intel 82801EB (ICH5) USB controller USB-B> on uhci1
uhci2: <Intel 82801EB (ICH5) USB controller USB-C> port 0x1480-0x149f irq 18 at device 29.2 on pci0
uhci2: [ITHREAD]
uhci2: LegSup = 0x0020
usbus2: <Intel 82801EB (ICH5) USB controller USB-C> on uhci2
ehci0: <Intel 82801EB/R (ICH5) USB 2.0 controller> mem 0xfc480000-0xfc4803ff irq 23 at device 29.7 on pci0
ehci0: [ITHREAD]
usbus3: EHCI version 1.0
usbus3: <Intel 82801EB/R (ICH5) USB 2.0 controller> on ehci0
pcib1: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci5: <ACPI PCI bus> on pcib1
bge0: <Broadcom NetXtreme Gigabit Ethernet Controller, ASIC rev. 0x3003> mem 0xfc500000-0xfc50ffff irq 20 at device 2.0 on pci5
miibus0: <MII bus> on bge0
brgphy0: <BCM5705 10/100/1000baseTX PHY> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
bge0: Ethernet address: 00:0f:20:74:c3:51
bge0: [ITHREAD]
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH5 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x14c0-0x14cf irq 18 at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
atapci1: <Intel ICH5 SATA150 controller> port 0x14f8-0x14ff,0x1810-0x1813,0x1800-0x1807,0x1814-0x1817,0x14d0-0x14df irq 18 at device 31.2 on pci0
atapci1: [ITHREAD]
ata2: <ATA channel 0> on atapci1
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci1
ata3: [ITHREAD]
pci0: <multimedia, audio> at device 31.5 (no driver attached)
acpi_button0: <Power Button> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77d irq 7 drq 3 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/13 bytes threshold
ppc0: [ITHREAD]
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
plip0: [ITHREAD]
lpt0: <Printer> on ppbus0
lpt0: [ITHREAD]
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: [FILTER]
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
cpu0: <ACPI CPU> on acpi0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
p4tcc1: <CPU Frequency Thermal Control> on cpu1
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
uart1: <16550 or compatible> at port 0x2f8-0x2ff irq 3 on isa0
uart1: [FILTER]
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 480Mbps High Speed USB v2.0
ad0: 76319MB <WDC WD800JB-00JJC0 05.01C05> at ata0-master UDMA100
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Intel> at usbus3
uhub3: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
acd0: DVDROM <NEC DV-5700A/3.07> at ata1-master UDMA33
SMP: AP CPU #1 Launched!
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
Root mount waiting for: usbus3
Root mount waiting for: usbus3
Root mount waiting for: usbus3
uhub3: 8 ports with 8 removable, self powered
Trying to mount root from ufs:/dev/ad0s3a
ugen1.2: <MLK> at usbus1
ukbd0: <EP1 Interrupt> on usbus1
kbd2 at ukbd0
ums0: <EP2 Interrupt> on usbus1
ums0: 5 buttons and [XYZ] coordinates ID=1
ugen2.2: <SIGMACH1P> at usbus2
ums1: <SIGMACH1P U+P Mouse, class 0/0, rev 1.10/1.10, addr 2> on usbus2
ums1: 3 buttons and [XYZ] coordinates ID=0
fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
bge0: link state changed to UP
drm0: <Intel i865G GMCH> on vgapci0
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] AGP at 0xf0000000 128MB
info: [drm] Initialized i915 1.6.0 20080730
drm0: [ITHREAD]
```


----------



## FreeJX (Mar 27, 2010)

```
$ xdpyinfo
name of display:    :0.0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    10601000
X.Org version: 1.6.1
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x1c00005, revert to Parent
number of extensions:    27
    BIG-REQUESTS
    Composite
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    DRI2
    GLX
    Generic Event Extension
    MIT-SCREEN-SAVER
    MIT-SHM
    RANDR
    RECORD
    RENDER
    SGI-GLX
    SHAPE
    SYNC
    X-Resource
    XC-MISC
    XFIXES
    XFree86-DGA
    XFree86-DRI
    XFree86-VidModeExtension
    XINERAMA
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  print screen:    no
  dimensions:    1680x1050 pixels (459x296 millimeters)
  resolution:    93x90 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x114
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0x7ac03c
    ButtonPressMask          ButtonReleaseMask        EnterWindowMask          
    LeaveWindowMask          KeymapStateMask          ExposureMask             
    StructureNotifyMask      SubstructureNotifyMask   SubstructureRedirectMask 
    FocusChangeMask          PropertyChangeMask       
  number of visuals:    64
  default visual id:  0x21
  visual:
    visual id:    0x21
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
......
```


----------



## FreeJX (Mar 27, 2010)

Hi fronclynne, 

Could you explain more on your cmd
`# nice -n 20 make buildworld`




			
				fronclynne said:
			
		

> Windows is hella fast.  I just ran `# nice -n 20 make buildworld` on Windows and it gave me a new command prompt in less than one second.  That is fast.


----------



## jailed (Mar 27, 2010)

First, format your posts:
http://forums.freebsd.org/showthread.php?t=8816

Actually fronclynne is just joking.

Did you do `# top -a` on console and look at what's eating your ram/cpu etc while you're thinking that your system is slow?


----------



## rossiya (Mar 27, 2010)

*No slowness here*



			
				FreeJX said:
			
		

> Hi fronclynne,
> 
> Could you explain more on your cmd
> `# nice -n 20 make buildworld`



He was obviously being facetious.  Although if you're comfortable tweaking your own kernel and rebuilding your system with the 'pentium4' CFLAG you'd get more speed.  Question for you: how is the speed at the console without X running?  Does it run fine then slow down?  What do systat and vmstat report?

I experienced firefox3.6 running about as fast as opera.  Of course, that's custom compiled not from pkg_add.


----------



## graudeejs (Mar 27, 2010)

rossiya said:
			
		

> He was obviously being facetious.  Although if you're comfortable tweaking your own kernel and rebuilding your system with the 'pentium4' CFLAG you'd get more speed.



prove it. I doubt it will give any measurable performance boost on modern hardware


----------



## FreeJX (Mar 27, 2010)

/etc/rc.conf
http://pastebin.org/125598

/etc/X11/xorg.conf
http://pastebin.org/125631

`$ dmesg`
http://pastebin.org/125632

`$ xdpyinfo`
http://pastebin.org/125633

Learnt! Thanks, jailed! 

rossiya,
It's fine at the console with X running. Ports are added by pkg_add / pkg_manager. Customization is a coming learn objective.


----------



## Zare (Mar 27, 2010)

FreeJX, disable hald and dbus, and add 


```
Option    AllowEmptyInput   "Off"
```

in ServerLayout section of xorg.conf. HAL and D-BUS really make my laptop sluggish, they seem to query hardware way too often and eat 10% of CPU easily. By the way, you don't really need them for X if that's desktop computer.

Also, while your XFCE is up, switch to another virtual console (Alt+F2, for instance), login, run top and post the output.

Otherwise, your config seems OK.


----------



## fronclynne (Mar 28, 2010)

Sorry, that joke was in kind of poor taste.

One quick check you can make is [cmd=""]vmstat -i[/cmd].  An interrupt storm can slow a machine down a _lot_.  Note, though, that it probably is not this.


----------



## volatilevoid (Mar 28, 2010)

An interrupt storm is also most likely logged to /var/log/messages so looking there might help as well.


----------



## FreeJX (Mar 28, 2010)

Zare said:
			
		

> FreeJX, disable hald and dbus, and add
> 
> 
> ```
> ...



Any more information for this ?

```
Option    AllowEmptyInput   "Off"
```

@Zare, are you suggesting to added the following entries in /etc/rc.conf?

```
moused_nondefault_enable="NO"
moused_enable="NO"
```


----------



## FreeJX (Mar 28, 2010)

@fronclynne

Could you tell me whether it is normal ? I've no idea for this.

```
# vmstat -i
interrupt                          total       rate
irq6: fdc0                             6          0
irq14: ata0                        56615          6
irq15: ata1                        65503          7
irq16: uhci0+                     160383         19
irq18: uhci2+                      58029          7
irq19: uhci1                        3554          0
irq20: bge0                         7362          0
irq23: ehci0                           3          0
cpu0: timer                     16438613       1999
cpu1: timer                     16438575       1999
Total                           33228643       4042
```


----------



## jailed (Mar 28, 2010)

FreeJX said:
			
		

> @fronclynne
> Could you tell me whether it is normal ? I've no idea for this.



Normal.


```
tail -n 50 /var/log/messages
```

You should see a message like "interrupt storm at irq xx ..."

However, your vmstat is ok.


----------



## Zare (Mar 28, 2010)

> Any more information for this ?



Yes. hald is a daemon which supplies information about hardware events (device plug in/out, etc...). D-BUS is an interprocess communication daemon that allows various programs to "talk" to eachother. Therefore, xorg relies on hald and it's "courier" dbus to get information about your peripheral hardware. That way, you don't need to explicitly specify your keyboard / mouse model and protocol in xorg.conf. xorg will autodetect it via hald.

However, HAL daemon can sometimes slow the system down, and i had that case on my laptop.

So, to turn off both of them, first shutdown your X server (ctrl + alt + backspace).
Stop hald and dbus;


```
/usr/local/etc/rc.d/hald stop
/usr/local/etc/rc.d/dbus stop
```

...then edit /etc/rc.conf and comment appropriate lines;


```
#hald_enable="YES"
#dbus_enable="YES"
```

Then edit /etc/X11/xorg.conf and add


```
Option   AllowEmptyInput   "Off"
```

into ServerLayout section of xorg.conf; that's anywhere between _Section "ServerLayout"_ and the nearest _EndSection_ tag.

AllowEmptyInput is turned on by default, hence the xorg won't auto add standard keyboard and mouse drivers, but will rely on hald/dbus instead. When you turn those daemons down, you need xorg to auto-add standard input drivers, or else you won't have keyboard or mouse control.


----------



## wblock@ (Apr 4, 2010)

Zare said:
			
		

> Then edit /etc/X11/xorg.conf and add
> 
> 
> ```
> ...



Please, stop recommending this.  AEI is the *wrong* way to disable HAL with xorg, and frequently causes problems like slow input or no input until mouse movement.  The right way is to use


```
Option "AutoAddDevices" "false"
```

as shown in the Handbook.  The next time you see someone recommending AEI, please correct them.  It popped up as a fix to a temporary bug a year ago and is still causing problems.


----------



## Zare (Apr 4, 2010)

Ok, i stand corrected. Didn't know that was going on.


----------



## aragon (Apr 4, 2010)

FWIW, I find it more effective to simply recompile the Xserver port with HAL support disabled.  No need to even run the daemon then, let alone worrying about configuring anything to ignore it.

This doesn't prevent your X window manager or apps from using HAL if you still need that.


----------



## wblock@ (Apr 5, 2010)

In xfce, I've found window closing delays to usually be a video driver problem, sometimes just exceeding what the Intel built-in video can do.  Here's the driver section from a netbook:


```
Section "Device"
        Identifier "Card0"
        Driver     "intel"
        BusID      "PCI:0:2:0"
        Option     "AccelMethod" "UXA"
        Option     "MigrationHeuristic" "greedy"
        Option     "CacheLines" "1980"
EndSection
```

This 845 chipset is slow when compositing is enabled in xfce, so that's disabled.  Go to Settings/Window Manager Tweaks/Compositor window and uncheck "Enable display compositing".


----------



## zeiz (Apr 5, 2010)

rossiya said:
			
		

> Although if you're comfortable tweaking your own kernel and rebuilding your system with the 'pentium4' CFLAG you'd get more speed.


I'm comfortable How (precisely) to tweak?

BTW I have "ancient" (~ 8 y.o.) machine with P4 2.4GHz @768MB of ram and FreeBSD's performance wasn't worse than XP. After ram upgrade to 2.5GB FreeBSD runs just excellent while XP seems doesn't benefit. My Firefox runs better on FreeBSD than on XP.


----------

