Profiling memory usage
Richard Hughes
hughsient at gmail.com
Mon Dec 11 05:42:36 PST 2006
On Mon, 2006-12-11 at 00:53 +0000, Richard Hughes wrote:
> Attached is the PDF showing the memory use. Remember the coldplug
> memory
> allocation used to be about 4Mb [1], and now the peak usage is about
> 140kb. Perhaps.
[root at hughsie-laptop hald]# ./profile-hald.sh
0..1..2..3..4..5..6..7..8..9..10..
total process time:
0m0.001s 0m0.003s
0m1.629s 0m0.438s
real 0m7.828s
user 0m0.157s
sys 0m0.187s
[root at hughsie-laptop hald]# ./profile-hald.sh --use-udevtrigger
0..1..2..3..4..5..6..7..8..9..10..
total process time:
0m0.002s 0m0.002s
0m0.151s 0m0.195s
real 0m17.730s
user 0m1.790s
sys 0m0.464s
i.e. 2.4x quicker to start using udevtrigger.
> There's still some devices missing, but I really think this idea is
> worth playing with.
And also the devices do not have the correct "parent" device. Some more
info on the missing block devices:
[root at hughsie-laptop hald]# cat /root/hald.txt | grep sda
13:40:37.798 [I] osspec.c:226: SEQNUM=22458, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sda, DEVNAME=/dev/sda, IFINDEX=0
13:40:38.000 [I] osspec.c:226: SEQNUM=22460, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda6, DEVNAME=/dev/sda6, IFINDEX=0
13:40:38.039 [I] osspec.c:226: SEQNUM=22459, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda7, DEVNAME=/dev/sda7, IFINDEX=0
13:40:38.053 [I] osspec.c:226: SEQNUM=22463, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda2, DEVNAME=/dev/sda2, IFINDEX=0
13:40:38.086 [I] osspec.c:226: SEQNUM=22462, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda3, DEVNAME=/dev/sda3, IFINDEX=0
13:40:38.092 [I] osspec.c:226: SEQNUM=22461, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda5, DEVNAME=/dev/sda5, IFINDEX=0
13:40:38.130 [I] osspec.c:744: hal_util_find_known_parenthal_util_find_known_parent: '/sys/block/sda'->'/sys/devices/pci0000:00/0000:00:1f.2'
13:40:38.130 [I] blockdev.c:614: block_add: sysfs_path=/sys/block/sda dev=/dev/sda is_part=0, parent=0x097bad80
13:40:38.216 [E] util.c:170: Cannot open '/sys/block/sda/sda6/range'
13:40:38.216 [I] blockdev.c:614: block_add: sysfs_path=/sys/block/sda/sda6 dev=/dev/sda6 is_part=1, parent=0x00000000
13:40:38.218 [I] osspec.c:226: SEQNUM=22464, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda1, DEVNAME=/dev/sda1, IFINDEX=0
13:40:38.241 [E] util.c:170: Cannot open '/sys/block/sda/sda7/range'
13:40:38.241 [I] blockdev.c:614: block_add: sysfs_path=/sys/block/sda/sda7 dev=/dev/sda7 is_part=1, parent=0x00000000
13:40:38.242 [E] util.c:170: Cannot open '/sys/block/sda/sda2/range'
13:40:38.242 [I] blockdev.c:614: block_add: sysfs_path=/sys/block/sda/sda2 dev=/dev/sda2 is_part=1, parent=0x00000000
13:40:38.246 [E] util.c:170: Cannot open '/sys/block/sda/sda3/range'
13:40:38.246 [I] blockdev.c:614: block_add: sysfs_path=/sys/block/sda/sda3 dev=/dev/sda3 is_part=1, parent=0x00000000
13:40:38.246 [E] util.c:170: Cannot open '/sys/block/sda/sda5/range'
13:40:38.246 [I] blockdev.c:614: block_add: sysfs_path=/sys/block/sda/sda5 dev=/dev/sda5 is_part=1, parent=0x00000000
13:40:38.247 [E] util.c:170: Cannot open '/sys/block/sda/sda1/range'
13:40:38.247 [I] blockdev.c:614: block_add: sysfs_path=/sys/block/sda/sda1 dev=/dev/sda1 is_part=1, parent=0x00000000
Richard.
More information about the hal
mailing list