[Csync2] linux kernel cpu optimization
Vincent Régnard
vregnard at tbs-internet.com
Thu Sep 11 16:35:27 CEST 2008
Giampaolo Tomassoni a écrit :
>> -----Original Message-----
>> From: csync2-bounces at lists.linbit.com [mailto:csync2-
>> bounces at lists.linbit.com] On Behalf Of Vincent Régnard
>> Sent: Thursday, September 11, 2008 3:03 PM
>> To: csync2 at lists.linbit.org
>> Subject: [Csync2] linux kernel cpu optimization
>>
>> Hi all,
>>
>> I have performance issues using csync2 on SMP system
>> I csync2 a big disk whith ~ 1 million files, no frequent updates, only
>> small changes on ext3 fs + linux 2.6.16 kernel. Cyncing is very long
>> (somtimes half an hour), hardware is efficient, process should
>> certainly
>> run better than that.
>> I forced all disk interrupt on CPU1 using the
>> /proc/irq/IRQ/smp_affinity
>> trick, but I observe that CPU1 remains in waiting state too much as
>> shown by the top above (about 50% on average) when csync is checking
>> the
>> whole file system tree.
>>
>> I execute csync2 with a nice priority (level 5)
>> top - 12:54:08 up 6 days, 1:33, 4 users, load average: 0.80, 0.65,
>> 0.66
>> Tasks: 139 total, 4 running, 135 sleeping, 0 stopped, 0 zombie
>> Cpu0 : 0.0% us, 9.4% sy, 2.3% ni, 66.9% id, 21.4% wa, 0.0% hi,
>> 0.0% si
>> Cpu1 : 11.3% us, 31.7% sy, 6.3% ni, 0.0% id, 49.7% wa, 0.3% hi,
>> 0.7% si
>> Mem: 903100k total, 893576k used, 9524k free, 68436k
>> buffers
>> Swap: 1959920k total, 8k used, 1959912k free, 312908k cached
>>
>> How can I improve that situation ? Can I tweek kernel params to change
>> that or is it csync2 internals specific ? NB: I do not have similar
>> behaviour with other heavy processes (such as zipping/unzipping huge
>> files, backup process etc..).
>
> If you're experiencing a low CPU usage but disk access is fast, problems may
> be around the network. What ifconfig is saying about your net interface? In
> particular, have a look to the errors/dropped/overruns/frames counters in
> the interface you use to csync. Do it on both nodes.
>
> Giampaolo
>
I think network is not a real problem in my case, or at least is not
responsible for this observed cpu latency. Without any network traffic
between hosts (controlled with tcpdump), I observe waiting ratios over
70% like this:
Cpu1 : 0.3% us, 17.4% sy, 3.0% ni, 0.0% id, 76.6% wa, 1.3% hi, 1.3% si
10800 root 22 5 4600 3564 768 R 45.6 0.4 0:20.14 csync2
Result is similar with and without nicing the process.
The large values of waiting ratios are observed when csync2 is accessing
disk.
--
Vincent Régnard
vregnard at tbs-internet.com
TBS-internet.com
027 630 5902
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5793 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.linbit.com/pipermail/csync2/attachments/20080911/6c52378a/smime-0001.bin
More information about the Csync2
mailing list