[Spread-users] main concern on High CPU utilization
Yair Amir
yairamir at spreadconcepts.com
Mon Mar 16 08:52:54 EDT 2009
Hi,
Spread is optimizing for latency. If you care less about latency, you can
pretty much cut most of the cpu usage by adding a very small delay at the representative
before sending the token (e.g. 2ms to 10ms). This can be done in the Prot_handle_token function
in protocol.c by adding a usleep call just before sending the token at the representative.
In my working version it would be to add the following + line after current line 630:
627 /* Send token */
628 if( ! ( Conf_leader( Memb_active_ptr() ) == My.id &&
629 To_hold_token() ) )
630 {
+ if (Conf_leader( Memb_active_ptr() ) == My.id) usleep(2000);
631 /* sending token */
632 Net_send_token( &New_token );
Enjoy,
:) Yair.
On 3/16/09 8:39 AM, Sandeep Jeevan wrote:
> Hi John
> I had upgraded to 4.x.x and had tried all the things in the document
> Now it is taking around 21% to 27 % please let me know if anything can be done to improve the CPU utilization. I just want to use only two procs in one segment not more than this. Please suggest some ways to get rid of high CPU utilization
>
> Sandeep jeevan
> Member Technical(Stack)
> Mob:9717892153
> VNL | 246, Phase IV, Udyog Vihar, Gurgaon, Haryana 122 015, INDIA | +91-124-4311600-609 | F +91-124-4104766 | www.vnl.in
>
>
>
>
> -----Original Message-----
> From: John Lane Schultz [mailto:jschultz at spreadconcepts.com]
> Sent: Tuesday, March 10, 2009 9:09 PM
> To: Sandeep Jeevan
> Cc: spread-users at lists.spread.org
> Subject: RE: Re[2]: [Spread-users] main concern on High CPU utilization
>
> To be honest, I don't know of any major change to the Ring protocol in v4
> versus v3. The only change that could have made a difference is that
> internally we use more sophisticated data structures in some places, but
> even then I wouldn't expect a x2 improvement in overhead.
>
> Cheers!
>
> ---
> John Lane Schultz
> Spread Concepts LLC
> Phn: 443 838 2200
> ________________________________________
> From: Sandeep Jeevan [mailto:sandeep.jeevan at vnl.in]
> Sent: Tuesday, March 10, 2009 5:29 AM
> To: John Lane Schultz
> Cc: spread-users at lists.spread.org
> Subject: RE: Re[2]: [Spread-users] main concern on High CPU utilization
>
> Hi John
> Yes I had tried both the configuration but both of them shows same CPU
> utilization .
> I am unable to take the snapshot of that but I had upgraded to 4.0.0 its is
> now taking around 16% to 17% CPU for same number of messages .In v 3.17.4 I
> had not made the changes to To_hold_token()
> Currently I am trying to go through the changes made in the version 4.x.x
>
> Sandeep jeevan
> VNL | 246, Phase IV, Udyog Vihar, Gurgaon, Haryana 122 015, INDIA |
> +91-124-4311600-609 | F +91-124-4104766 | www.vnl.in
> -----Original Message-----
> From: John Lane Schultz [mailto:jschultz at spreadconcepts.com]
> Sent: Monday, March 09, 2009 7:13 PM
> To: Sandeep Jeevan
> Cc: spread-users at lists.spread.org
> Subject: Re[2]: [Spread-users] main concern on High CPU utilization
>
> Hi Sandeep,
>
> Did you try the unicast configuration I recommended to you? Did it make any
> difference? Do you have the output from sp_monitor, both for the multicast
> and unicast configurations I recommended to you? Can you post them in an
> email? Did you upgrade to v3.17.4? And/or did you make the change to
> To_hold_token() as we discussed?
>
> It very well could be that the load you are seeing is how Spread runs on
> your particular CPU with that level of traffic going through it; as I said,
> it is a bit of a CPU hog. On top of the line Intel processors running linux
> (fedora), Spread can push a couple hundred Mega BITS per second before it
> becomes CPU or scheduling limited.
>
> Cheers!
> John
>
> ---
> John Lane Schultz
> Spread Concepts LLC
> Phn: 443 838 2200
> Fax: 301 560 8875
>
> Monday, March 9, 2009, 4:44:25 AM, you wrote:
>
>
> Yes that's right it's a flavor of Linux (it is a real time operating system
> )
> Its shows 30 % under load I am sending 1352 messages per second from the
> client to daemon.
> Vendor freescale
> Processor MPC8560
> busFreq 833.333325Mhz
> memory 1024 MB
> I had upgraded to 4.x.x it had reduced the CPU to 17% can it be further
> decreased to under 10%.
> I am sending 1352 packets ranging from(800 bytes to 1500 bytes) in a sec.
> And no it is not a "G4" and "G3"
>
>
> Sandeep jeevan
> Member Technical(Stack)
> Mob:9717892153
> VNL | 246, Phase IV, Udyog Vihar, Gurgaon, Haryana 122 015, INDIA |
> +91-124-4311600-609 | F +91-124-4104766 | www.vnl.in
>
>
>
>
> -----Original Message-----
> From: Alexey Zakhlestin [mailto:indeyets at gmail.com]
> Sent: Monday, March 09, 2009 12:46 PM
> To: Sandeep Jeevan
> Cc: Christopher Browne; spread-users at lists.spread.org; John Lane Schultz
> Subject: Re: [Spread-users] main concern on High CPU utilization
>
> On Mon, Mar 9, 2009 at 7:16 AM, Sandeep Jeevan <sandeep.jeevan at vnl.in>
> wrote:
>> Hi
>> Sorry for not correctly identifying the things said to me .
>> I am using monta vista (operating system ) running on power P.C
> architecture
>
> which is: kind of linux. right?
>
>> But is it going to have any concern regarding the CPU utilization on that
> particular architecture.
>
> Does it show 30% of utilization in the calm state or under load?
> What kind of load do you have? (number of messages per second)
> What is the speed of CPU? Is it so called "G4" or "G3" CPU?
>
> John asked you to upgrade to 3.17.4. Сan you do that? Does it help?
>
> --
> Alexey Zakhlestin
> http://www.milkfarmsoft.com/
> The information contained in this e-mail is private & confidential and may
> also be legally privileged. If you are not the intended recipient, please
> notify us, preferably by e-mail, and do not read, copy or disclose the
> contents of this message to anyone.
>
>
> The information contained in this e-mail is private & confidential and may
> also be legally privileged. If you are not the intended recipient, please
> notify us, preferably by e-mail, and do not read, copy or disclose the
> contents of this message to anyone.
> The information contained in this e-mail is private & confidential and may also be legally privileged. If you are not the intended recipient, please notify us, preferably by e-mail, and do not read, copy or disclose the contents of this message to anyone.
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users
More information about the Spread-users
mailing list