FreeBSD desktop performance- Am I using Shared Memory?

Hello. In my office, my main workstation is an AMD 64 x2 PC w/ 8GB ram and nVidia twinview. It usually runs Linux but since FreeBSD has nVidia AMD64 drivers again, I've decided to give it a go.

My configuration is pretty spartan, Developer + Kernel Developer + Xorg, nvidia-driver, Fluxbox, enlightenment, Firefox and mplayer from ports.

Performance doesn't seem to be all that it could be so I'm afraid. Often Firefox hangs for awhile, unresponsive, though it will after many seconds get around to fullfilling all the requests I clicked on (like changing between tabs, closing a tab, scrolling). Perhaps nswrapper+linuxflash10 is the problem?

All this performance makes me think I may have omitted some configuration some where.

For instance, a few programs are complaining about "Shared memory":
If I enable the "Composite" module in enlightenment it promptly SEGV's (E17 catches it and offers me recovery). At the command line I see many lines
Code:
Currently unimplemented ecore_x_image_get without shm

Now, I see when playing mplayer
Code:
VO: [xv] 320x240 => 320x240 Planar YV12 
[VO_XV] Shared memory not supported
Reverting to normal Xv.
[VO_XV] Shared memory not supported
Reverting to normal Xv.

I've noodled a bit with my sysctl (after I experienced these) but I generally trust the more experienced developers that set them.
Code:
fiery# sysctl -a | grep shm
kern.ipc.shm_allow_removed: 1
kern.ipc.shm_use_phys: 0
kern.ipc.shmall: 8192
kern.ipc.shmseg: 128
kern.ipc.shmmni: 192
kern.ipc.shmmin: 1
kern.ipc.shmmax: 33554432
kern.features.posix_shm: 1

Am I somehow missing this magical shared-memory thing?

Thanks in advance.
 
I have these in /etc/sysctl.conf

Code:
# Enhance shared memory X11 interface
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
#
# Enhance desktop responsiveness under high CPU use (200/224)
kern.sched.preempt_thresh=224
 
scratchmo said:
Performance doesn't seem to be all that it could be so I'm afraid. Often Firefox hangs for awhile, unresponsive, though it will after many seconds get around to fullfilling all the requests I clicked on (like changing between tabs, closing a tab, scrolling). Perhaps nswrapper+linuxflash10 is the problem?

Maybe, although I don't see that. Look for an AllowEmptyInput setting in your xorg.conf. It may not be the cause of this problem, but check the easy stuff first.
 
wblock said:
Maybe, although I don't see that. Look for an AllowEmptyInput setting in your xorg.conf. It may not be the cause of this problem, but check the easy stuff first.

$ man xorg.conf

Code:
       Option "AllowEmptyInput" "boolean"
              If  enabled,  don't add the standard keyboard and mouse drivers,
              if there are no input devices in the config  file.   Enabled  by
              default if AutoAddDevices and AutoEnableDevices is enabled, oth-
              erwise disabled.  If AllowEmptyInput is on,  devices  using  the
              kbd, mouse or vmmouse driver are ignored.

       Option "AutoAddDevices" "boolean"
              If  this  option is disabled, then no devices will be added from
              HAL events.  Enabled by default.

       Option "AutoEnableDevices" "boolean"
              If this option is disabled, then the devices will be added  (and
              the  DevicePresenceNotify  event  sent),  but  not enabled, thus
              leaving policy up to the client.  Enabled by default.

None of these is set in xorg.conf so I must be at defaults. Which setting are you recommending for this knob?
 
rusty said:
I have these in /etc/sysctl.conf

Code:
# Enhance shared memory X11 interface
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
#
# Enhance desktop responsiveness under high CPU use (200/224)
kern.sched.preempt_thresh=224
I will try your recommended sysctl's tomorrow. Do they require a reboot?
 
rusty said:
I have these in /etc/sysctl.conf

Code:
# Enhance shared memory X11 interface
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
#
# Enhance desktop responsiveness under high CPU use (200/224)
kern.sched.preempt_thresh=224

On your advice I set my system as follows:

Code:
kern.ipc.shmmax: 33554432 -> 67108864
kern.ipc.shmall: 8192 -> 32768
kern.sched.preempt_thresh: 64 -> 224

I now no longer get the shared memory messages from mplayer and composited started working from E17. How weird!

While there is still some weirdness with Firefox, I think it is a separate issue and am marking this thread solved. Thank you for your responses!
 
Back
Top