Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7887097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:29:30+00:00 2026-06-03T05:29:30+00:00

I do some local experiments on different database systems. I collect (sum up) CPU

  • 0

I do some local experiments on different database systems. I collect (sum up) CPU information from /proc/status before and after I execute a query. The difference should tell me the amount of jiffies or USER_HZ during query runtime. But the difference is zero when (according to clock_gettime()) a query has a runtime somewhere below 0.001 seconds. Is this to fast to utilize the CPU information or am I missing something else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:29:31+00:00Added an answer on June 3, 2026 at 5:29 am

    A jiffy, as of Linux kernel 2.6.0, is 1/250 of a second, or 0.004 seconds [see time(7)]. You’ll never get a smaller resolution than that.

    I recommend you use the rdtsc instruction, which is likely available as a compiler intrinsic. This is incremented every 1 CPU tick, so by dividing by the frequency you can get the amount of time that passed. You can also implement it with inline assembly.

    It’s actually a bit ridiculous to be checking /proc/status because there’s a good chance that opening the file descriptor and reading the contents will actually take longer than your query did to execute. rdtsc is much more reliable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to update some local access databases from a web database. When
Hi i am loading local html file after handling some javascript alerts on webchromeclient,
I am trying to do some experiments using different segments besides the default code
Its easy to grab XML directly of your own domain from some local URL,
I stashed some local changes before doing a complicated merge, did the merge, then
I've got some local files that need to be updated from S3 occasionally. I'd
I use svn:externals to reference several open source projects. I then make some local
What are some options to avoid the latency of pointing local django development servers
I need some kind of dialog for browsing the local SMB network for file
for some reason I'm thinking on implementing interface within a some function(method) as local

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.