Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Updatedb - how long should it take?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CurtE
Guru
Guru


Joined: 17 Apr 2004
Posts: 364
Location: Minneapolis, MN

PostPosted: Tue Sep 29, 2009 12:15 am    Post subject: Updatedb - how long should it take? Reply with quote

I have two servers and have noticed that on one, updatedb, takes a long time. 5-6 sec vs. 43-49 sec.

I realize this may just be the difference in processor speed between the two servers but is there a way to measure this?

Also, how would you display the server/processor info?
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Tue Sep 29, 2009 12:45 am    Post subject: Reply with quote

You can see it with
Code:
 top

and also
Code:
cat /proc/cpuinfo
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Sep 29, 2009 1:24 am    Post subject: Reply with quote

Also, you should check the speed of you hdd.

Code:

# emerge -av hdparm
# hdparm -tT /dev/sda
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Tue Sep 29, 2009 1:28 am    Post subject: Reply with quote

Wow...there are numerous factors that impact updatedb. 3 of the biggest are IO performance, CPU speed and finally, the biggest...total disk capacity!
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Tue Sep 29, 2009 3:02 am    Post subject: Reply with quote

... and which locate/updatedb you use:

sys-apps/mlocate is a merging locate/updatedb implementation, updatedb reuses the existing database to avoid rereading most of the file system, which makes updatedb faster and does not trash the system caches as much.


In fact in a typical GNU/Linux installation, updatedb in cron.daily is called by run-parts at around 3 AM.
Back to top
View user's profile Send private message
CurtE
Guru
Guru


Joined: 17 Apr 2004
Posts: 364
Location: Minneapolis, MN

PostPosted: Tue Sep 29, 2009 3:39 am    Post subject: Reply with quote

csmn1 ~ # cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : AMD Athlon(tm) XP 1700+
stepping : 1
cpu MHz : 1470.032
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
bogomips : 2942.61
clflush size : 32


csmn2 ~ # cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 9
cpu MHz : 2800.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : 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 ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips : 5585.62
clflush size : 64
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 9
cpu MHz : 2800.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : 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 ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips : 5585.73
clflush size : 64
power management:

Obviously, it's the processor speed. It's bad when you order a computer and don't pay any attention to the speed. csmn2 is a lot faster than I thought and the price was good too.

Now the question from the results. I am pretty sure for $500 (2+ years ago) that I didn't get a dual processor, so why does it look that way?
Back to top
View user's profile Send private message
CurtE
Guru
Guru


Joined: 17 Apr 2004
Posts: 364
Location: Minneapolis, MN

PostPosted: Tue Sep 29, 2009 3:47 am    Post subject: Reply with quote

csmn1 ~ # hdparm -tT /dev/hda

/dev/hda:
Timing cached reads: 610 MB in 2.00 seconds = 304.59 MB/sec
Timing buffered disk reads: 162 MB in 3.01 seconds = 53.85 MB/sec

csmn2 ~ # hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 4112 MB in 2.00 seconds = 2055.85 MB/sec
Timing buffered disk reads: 222 MB in 3.03 seconds = 73.35 MB/sec

Obviously, the hard drive is faster on csmn2 also.

Thanks, I learned some more about the servers that I was unaware of.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Sep 29, 2009 11:51 am    Post subject: Reply with quote

No problem :P
Back to top
View user's profile Send private message
pdr
l33t
l33t


Joined: 20 Mar 2004
Posts: 618

PostPosted: Tue Sep 29, 2009 12:04 pm    Post subject: Reply with quote

Note that the core id for both is zero - I would assume you are using hyperthreading. When I check my core 2 duo I get (1) the Intel id string specifies Dual CPU, and (2) the core id for processor 0 is 0, and the core id for processor 1 is 1.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Tue Sep 29, 2009 12:58 pm    Post subject: Reply with quote

What does dmesg | grep -i cpu return?
Back to top
View user's profile Send private message
CurtE
Guru
Guru


Joined: 17 Apr 2004
Posts: 364
Location: Minneapolis, MN

PostPosted: Tue Sep 29, 2009 1:46 pm    Post subject: Reply with quote

csmn1 ~ # dmesg | grep -i cpu
Initializing CPU#0
SLUB: Genslabs=12, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
Intel machine check reporting enabled on CPU#0.
CPU0: AMD Athlon(tm) XP 1700+ stepping 01
Brought up 1 CPUs
microcode: CPU0 not a capable Intel processor
Switched to high resolution mode on CPU 0
cpuidle: using governor ladder
cpuidle: using governor menu
powernow-k8: Processor cpuid 681 not supported

csmn2 ~ # dmesg | grep -i cpu
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Transmeta TransmetaCPU
[ 0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[ 0.000000] SMP: Allowing 4 CPUs, 2 hotplug CPUs
[ 0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:4 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 12 pages at c1806000, static data 25748 bytes
[ 0.000000] Initializing CPU#0
[ 0.000999] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000999] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[ 0.000999] CPU: Trace cache: 12K uops, L1 D cache: 16K
[ 0.000999] CPU: L2 cache: 1024K
[ 0.000999] CPU: Physical Processor ID: 0
[ 0.000999] CPU: Processor Core ID: 0
[ 0.001120] Intel machine check reporting enabled on CPU#0.
[ 0.001226] CPU0: Intel P4/Xeon Extended MCE MSRs (24) available
[ 0.127897] CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
[ 0.000999] Initializing CPU#1
[ 0.000999] CPU: Trace cache: 12K uops, L1 D cache: 16K
[ 0.000999] CPU: L2 cache: 1024K
[ 0.000999] CPU: Physical Processor ID: 0
[ 0.000999] CPU: Processor Core ID: 0
[ 0.000999] Intel machine check reporting enabled on CPU#1.
[ 0.000999] CPU1: Intel P4/Xeon Extended MCE MSRs (24) available
[ 0.000999] x86 PAT enabled: cpu 1, old 0x7040600070406, new 0x7010600070106
[ 0.199926] CPU1: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
[ 0.200120] checking TSC synchronization [CPU#0 -> CPU#1]: passed.
[ 0.200992] Brought up 2 CPUs
[ 0.874014] Switched to high resolution mode on CPU 0
[ 0.874450] Switched to high resolution mode on CPU 1
[ 0.948573] alloc irq_desc for 16 on cpu 0 node 0
[ 0.948576] alloc kstat_irqs on cpu 0 node 0
[ 0.948942] alloc irq_desc for 17 on cpu 0 node 0
[ 0.948945] alloc kstat_irqs on cpu 0 node 0
[ 1.014535] alloc irq_desc for 24 on cpu 0 node 0
[ 1.014539] alloc kstat_irqs on cpu 0 node 0
[ 1.014774] alloc irq_desc for 25 on cpu 0 node 0
[ 1.014778] alloc kstat_irqs on cpu 0 node 0
[ 1.015079] alloc irq_desc for 26 on cpu 0 node 0
[ 1.015082] alloc kstat_irqs on cpu 0 node 0
[ 1.015393] alloc irq_desc for 27 on cpu 0 node 0
[ 1.015397] alloc kstat_irqs on cpu 0 node 0
[ 1.070037] processor ACPI_CPU:00: registered as cooling_device0
[ 1.070238] processor ACPI_CPU:01: registered as cooling_device1
[ 1.073643] alloc irq_desc for 20 on cpu 0 node 0
[ 1.073647] alloc kstat_irqs on cpu 0 node 0
[ 1.236834] alloc irq_desc for 18 on cpu 0 node 0
[ 1.236837] alloc kstat_irqs on cpu 0 node 0
[ 1.241741] alloc irq_desc for 21 on cpu 0 node 0
[ 1.241744] alloc kstat_irqs on cpu 0 node 0
[ 1.258821] alloc irq_desc for 22 on cpu 0 node 0
[ 1.258824] alloc kstat_irqs on cpu 0 node 0
[ 1.261752] alloc irq_desc for 23 on cpu 0 node 0
[ 1.261755] alloc kstat_irqs on cpu 0 node 0
[ 1.270670] cpuidle: using governor ladder
[ 1.270776] cpuidle: using governor menu
[ 1.279438] p4-clockmod: P4/Xeon(TM) CPU On-Demand Clock Modulation available

And this means what in laymans terms? LOL
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Tue Sep 29, 2009 3:02 pm    Post subject: Reply with quote

if your question was
    Now the question from the results. I am pretty sure for $500 (2+ years ago) that I didn't get a dual processor, so why does it look that way?

then the answer is
    [ 0.200992] Brought up 2 CPUs
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum