473,657 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question regarding CPU usage

ashitpro
542 Recognized Expert Contributor
Hi all,
I am using linux kernel 2.6.20
I've developed one scheduler for my project.
It has many threads working in it.
It is taking 30% of cpu. According to my calculation it should not take this much.
So surely something is wrong with the code.
I got few infinite while loops too, but I also used sleep system calls in each.
So what are other possible reasons that I should look for?
Oct 9 '07 #1
3 1397
arunmib
104 New Member
can you give info. as how many threads are there and the functionality of them.
Oct 9 '07 #2
ashitpro
542 Recognized Expert Contributor
can you give info. as how many threads are there and the functionality of them.
15 threads waiting for dbus call
Oct 9 '07 #3
arunmib
104 New Member
Like what do the 15 threads do when waiting? Do you they all "sleep()" for same time and ping the 'dbus' library at same time causing havoc or have you handled that efficiently.
dbus - you are speaking about the interprocess communication stuff right.
I think you would have gone through their FAQ section fully. In general it is 2.5 times slower than normally doing a socket communcation. So it obviously means you've got some problem or performance related issues. The faq link,

http://dbus.freedesktop.org/doc/dbus-faq.html

There is another chap who has done a performance testing, I think his results will be of use to you.
http://lists.freedesktop.org/piperma...er/001779.html

So in general, an option is that the dbus's inherent performance issue can be the problem.

If you are mentioning about someother 'dbus', then please clarify and ignore this post. Enlighten me if I have seen or said something wrong.
Oct 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1612
by: John Smith | last post by:
I am doing some research regarding writing a small webserver in java... So my question is: How long would it take to write a small webserver in java, by say some one who has little experience in java but has a strong programming background ? Would it be possible to run this from a Windoze CE ?
2
6687
by: W. Loo | last post by:
Hi, I've got a question regarding the usage of Request.ServerVariables. I'm not sure this is really a ASP question, so redirects to a more appropriate newsgroup are welcome. I have a variable that is being passed to me through HTTP headers called "Test." I am able to see this variable and its value when I use Request.ServerVariables("ALL_HTTP"). Additionally, when I iterate through Request.ServerVariables using a "For Each key in
4
3822
by: solartimba | last post by:
I am a stats man that uses C++ to analyze stock data, but I have run into a problem regarding memory usage. First, though, I need to give a little background info. I want to write a program that will open up 132 files containing daily stock market data. I estimate that each file contains around 91,000 bytes. Multiplied by 132, this equals 12 million bytes. Given that I have 512 megs of memory, I thought that I would have no problem...
9
3745
by: Dave H | last post by:
Hello, I have a query regarding definition lists. Is it good practice semantically to use the dt and dd elements to mark up questions and answers in a frequently asked questions list, or FAQ? Here is an example of just such a usage: <dl class="faq"> <di>
8
5240
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is developing a web-based application, one part of which involves allowing the user the ability to page through transaction "history" information. The _summary_ history table will have the following fields: ServiceName, Date, User-Ref1, User-Ref2,...
6
532
by: m sergei | last post by:
main(int argc, char *argv) the second parameter to function main takes a pointer to an array. can we also write it in terms of a reference rather than a pointer ? an example of using (usage) as a reference would be helpful
2
1623
by: Dean R. Henderson | last post by:
For an ASP.NET web application, is there a way for one session (with appropriate security authorization) to set a HttpSessionState variable to point to another session and execute the Abandon command to close out the other session?
2
1176
by: Prabhu Gurumurthy | last post by:
Here is a simple program, which queries /var/log/daemon on my OpenBSD box and gets the list of valid ntp peers. Questions: what is the easiest way for me to create lists on the fly, by that I mean like perl push my @foo, something_from_say_stderr. The reason is as you can ip = statement before the for loop, I want to avoid that and use list within the second ip loop, where I extract the ip address. Am I confusing?
12
1316
by: ciccio | last post by:
Hi, I was wondering why in the following piece of code, the function test1 calls a copy constructor at return and why test2 does not. Is the usage of multiple return statements in one function not really a good programming style? Thanks for the help #include <iostream>
1
6460
by: Max2006 | last post by:
Hi, To protect my WCF service boundaries, I assign a unique support ticket to all server side exceptions, log them and send a general FaultException to client that only include the support ticket. Support ticket is just a GUID that comes along with the exception log at the server side. From WCF programming best practice, What would be the best way to send the
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.