Why is the default on Windows 8 K page size?

Hello

I do some work setting on our databases because the Scriptures are a bit slow:
about 100 puts / deletes per second. One thing I'm getting is setting the fill factor
as recommended in the API docs and requires knowledge of the size of the page.

I found that the system on linux and windows (x 86) page size is 4 K.
However, the BDB chooses a page size default of 4K on linux and 8K on windows.
I found this by collecting data using Db::stat_print() see Windows test code below.
I have the same code that runs on both platforms.

I was expecting that BDB would choose 4K on both platforms to match to the
System page size. The docs and "The Berkeley DB Book" say or imply
that this is the case.
http://www.Oracle.com/technology/documentation/Berkeley-DB/DB/ref/am_conf/PageSize.html
http://www.Oracle.com/technology/documentation/Berkeley-DB/DB/api_cxx/db_set_pagesize.html

Can someone explain why the default page size is 8K on windows?
Should I replace the default value and set it to 4K? I am reluctant to substitute the
page size by default without knowing why a non intuitive value.

I have read several forum posts on the page size, as well as the reference setting
Guide section, API docs, etc.

I use BDB 4.6.21 on Windows XP Professional (fully patched) and linux.
I use a DB_HASH database.

My files are fixed size: the key and the data set total 40 bytes.
If the overflow pages should not be a problem, and there should be a lot of
records per page.


#include '... /.. '. "/ db-4.6.21/build_windows/db_cxx.h".
#include < Windows.h >
#include < errno.h >

void printInfo();
DbEnv * getDatabaseEnvironment();
DB allocateNewDbHandle (const char dbName);
void printSystemPageSize();

const char * dbEnvHome = "D:\\bdb\\bdbtest\\";
const char * dbToStat = "D:\\bdb\\bdbtest\\testStat.db";

DbEnv * dbEnv = NULL;
DB * dbh = NULL;

int main (int, char *)
{
printInfo();
dbEnv = getDatabaseEnvironment();
DBH = allocateNewDbHandle (dbToStat);

printf ("\n");
int rc = dbh-> stat_print (DB_FAST_STAT);
printSystemPageSize();
}

Sub printInfo()
{
int major, minor, patch;
char * bdbVersion = DbEnv::version (major, minor, and patch);
printf ("BDB version [%s] \n", bdbVersion);
}

DbEnv * getDatabaseEnvironment()
{
int rc = 0;
u_int32_t flags = DB_CREATE | DB_THREAD | DB_INIT_CDB | DB_INIT_MPOOL;

DbEnv * env = new DbEnv (DB_CXX_NO_EXCEPTIONS);
If ((rc = env-> Ouvrir (dbEnvHome, drapeaux, 0))! = 0)
{
printf ("attempt to create the environment of BDB failed: error = %d [%s] \n",)
RC, DbEnv::strerror(rc));
env-> close (0);
Remove env;
return null;
}

return the env;
}

DB allocateNewDbHandle (const char dbName)
{
int rc = 0;
DB * theDbToOpen = new Db (dbEnv, 0);

If ((rc = theDbToOpen-> Ouvrir (, dbName, NULL, DB_HASH, DB_CREATE, 0))! = 0)
{
printf ("CANNOT open db handle error = %d [%s] \n", rc)
DbEnv::strerror(rc));
theDbToOpen-> close (0);
delete theDbToOpen;
theDbToOpen = NULL;
}

Return theDbToOpen;
}

Sub printSystemPageSize()
{
SYSTEM_INFO siSysInfo;
Memset (& siSysInfo, 0, sizeof (SYSTEM_INFO));
: GetSystemInfo(&siSysInfo);
unsigned int pageSize = siSysInfo.dwPageSize;
printf ("page size \n\nSystem = %u\n\n", pageSize);
}

Hello

We use a default 8K on Windows page size because it is not easy to recover from a specific block size.

The comment in the code to set the block size is:

        /*
         * The filesystem I/O size is not easily available.  In particular,
         * the values returned by GetDiskFreeSpace() are not very helpful
         * (NTFS volumes often report 512B clusters, which are too small to
         * be a useful default).
         */

If you know a way to reliably determine the block size of system files in Windows - we can integrate it into the code.

We choose a default value of 8K on all platforms where we do not find a specific block size. This is because it is usually better - for performance reasons - to have a writing of data in chunks larger than the block size.

If you read the reference guide on page size setting, you can probably do better than our "guess". You just configure the page size you want through the DB-> set_pagesize API.

Kind regards
Alex Gorrod, Oracle Berkeley DB

Tags: Database

Similar Questions

  • How can I change orientation of the default print Windows 7 landscape to portrait painting?

    Original title: Windows 7 default paint print orientation.

    How can I change orientation of the default print Windows 7 landscape to portrait painting?

    I would not be forced to change every time I have use Paint.

    Thank you, Jay

    Hi Jay,.

    There is no option available to change the orientation of the default Windows 7 Paint print.

    However, you can set default print options to print landscape and impression accordingly paint program.

    For more information, see this link:

    http://support.Microsoft.com/kb/305402

    Hope the helps of information.

  • Why the default format window opens in the new documents open in Pages 5.6.1?

    Someone else asked this before, but it is with an older version of Pages, and it's a few years, so I thought I'd make a new discussion.

    Everytime I open a new document in Pages (version 5.6.1 on OS 10.11.2, on a 13 "Macbook Pro of 2009), the formatting window is open. It's ugly and I do not want to use immediately. What is the default? Like other posters, I tried to create a model that does not do that, but even at the opening with the model, it opens but each time. As in the other poster said: this is not a terrible amount of work, but it is very annoying to do all the time. This has happened for years. A word about the recent patches?

    Not and unlikely he's going to change.

    Peter

  • Restore the default message window

    I accidentally resized my window Messages and I would like to reset to the default.

    Click and drag the lower right of the window to resize.

  • Why are the images in Windows Live / Skydrive photo albums not visible?

    The icons are gray.

    The photos are visible with IE9.

    Have you checked other possibilities in the article?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

    If this does not work in mode without failure, then disable all extensions and then try to find out who is the cause by allowing both the problem reappears.

    • Choose "Disable all add-ons" on issues to troubleshoot Firefox in Safe Mode to set window to disable all extensions.
    • Close and restart Firefox after each change through "file > exit ' (Mac: ' Firefox > leave";) Linux: "file > exit ')

    In Firefox 4, you can use one of them to start in the questions to troubleshoot Firefox in Safe Mode:

    • Help > restart with disabled modules
    • Hold down the SHIFT key while double-clicking the shortcut from the desktop Firefox (Windows)

    You can also try to 'Reset all the preferences for the default user of Firefox' at the start of Firefox to solve the issues in Safe Mode window.

  • Why does the login screen Windows continue reappear on my monitor?

    I use Windows 7 Pro.  Until a few months ago, I couldn't leave my desktop PC on overnight.  As soon as I sat down and moved the mouse or tap a key on the keyboard, my screen saver would disappear and I could go right to work.  It was great!  Several months ago, a problem started that I describe.

    Now, when I walk away from my PC for a few hours and return, I see the Windows login screen.   It is not all the time, but it produces most of the time.   My first step in tackling the problem was to check the settings of the screen Setter.  The bomber of the screen ("ribbons") is supposed to go after 12 minutes of inactivity.

    There is a box to the right of this setting that says 'On Resume, display the login screen'.  This box is averified.

    Then I adjusted to High Performance power settings.  PC display is Never set for when to turn off the screen and also never to when putting the computer to sleep.   I then changed the advanced power settings to try to remedy the problem.  I made sure the following settings are the following:

    High Performance requires no password on wake up.

    Turn off the hard drive at the end of 800 minutes

    The sleep settings:

    Sleep after = never

    Allow hybrid sleep = Off

    Hibernate after = never

    Enable timers wake = Disable

    Turn off the display = never

    Power button: Sleep button Action = Nothing

    For security reasons, I usually use my PC as a standard user.  But the login screen Windows guard reappear after I leave my PC for a while if I run as a limited user or administrator of the master.

    Can you give me some additional ideas on what I can do to remove the login screen Windows reappear after I leave my PC?

    Hello

    Thank you for your reply with the requested information, sorry for the delay in response.

    I suggest you follow the steps below:
    1. on your desktop "Windows + R" screen press button together press
    The Board of Directors.
    2. in the command box type run 'control userpasswords2' click OK.
    3. uncheck the box for "users must enter a user name and password
    This computer '.
    4. change the screen saver 'Ribbons' to something else for example
    'Bubbles '.
    5 restart the computer.
    Now, check if the problem reappears.
    Hope this helps, please answer with the results for assistance.
  • How to set the default font to a lower value size?

    I recently received the update of the Firefox 22.0 20130514181517 build (at the same time as an update to Windows 7, I might add) and since then, on every Web site default font sizes have been expanded. I have a 17 "monitor, but due to fonts grossly overscaled, it looks more like an old 14", and it is quite irritating. To view websites in about the old way, they serve to study, I have to zoom out twice, but it also means that I have to do this on all websites. I also used to zoom accidentally inside or outside while using the touchpad on my laptop, so whenever I have ctrl-0 to restore the police, it goes back to the large font size, and I need her rezoom again.

    I am mostly trying to figure out if there is a way to reset the font size without the help of Add-ons.

    Thank you

    Amendments of the code regarding the HiDPI support high-resolution displays have landed at Firefox 22 and later (bug #844604).

    You can change the layout.css.devPixelsPerPx and increase or decrease the value of 0.1 or 0.05 as follows to adjust the size of fonts and other elements in Firefox.

    • The layout.css.devPixelsPerPx pref is a string parsed in float value and allows you to adjust the dimensions of all elements (user interface and web pages) specifically (resolution 0.1 or 0.05).
    • Change the default value of-1 to 1 to make it work as in previous versions of Firefox (100%)

    Start with a value of 1 and adjust this value with 0.1 or 0.05 for finer settings.

    • Use values between 1.0 and around 0.5 to reduce the size of the items (do NOT go all the way to 0.05!)
    • Use a value greater than 1.0 to grow and enlarge the elements (percentage divided by DPI, % / DPI).
    • http://KB.mozillazine.org/about:config

    If the web pages must be adjusted after changing this pref so you can watch the extension Default FullZoom Level or NoSquint.

    This extension allows to adjust the font size for the user interface:

  • How to set the default value of magnification up Page?

    I prefer the option of the Page matches the option to adjust the default width. How can I configure default Page Fit?

    Hi walter2015,

    You can set as a default application in the Page display preferences (in the Zoom pop-up menu).

    Please let us know if that's what you're looking for.

    Best,

    Sara

  • If the default value for axis of page views

    How a default value can be defined for axis of page views? If anyy possibility all also help in the operation of avoidibg request worksheet.

    Thanx

    Hello
    First Member that you specified in the section of the page is the default member. You can place a user as first member variable and gives you the ability to define a default member for each user.

    See you soon,.
    Alp

  • Why is my ESP larger than my canvas page size?

    I'm new to Illustrator, please work with me: b

    I use illustrator to create a t-shirt for Teespring design. Teespring requires either ESP, JPG, GIF, PNG files. With the help of illustrator, it seems that the ESP is my only option...

    The "Web" is the right size for my t-shirt design, yet, when I save the file and upload it to Teespring, it has added a 50-75% of free space in the file of the image that appears on the white t-shirt model. I noticed also right that this added empty space on the preview of the file of this image when my Mac consulting. Again, I'm new to illustrator, but is there some kind of page size I can adjust to fit the canvas size exact that I created to eliminate empty space?

    Thanks for the help!

    -Newb

    Derek,

    Guessing canvas means the artboard, you can have something invisible outside it.

    If so, you can Ctrl / Cmd + A to select the entire document, you can find and delete everything that is out there, and then try again.

  • Why in the mail 8 windows application... I don't see emails from the last 14 days?

    in the mail app on windows 8, when I check my emails, old posts over 14 days do not show. Im guessing that this is a kind of filter on but why is she active as default? It is causing quite a few problems. can anyone help?

    This also works:
    a. open Mail app
    b. press the button of the Windows + I logo
    c. click accounts

    d. click the Live (your account)
    e. change 'two weeks' download Email at "any time".

  • Restore the default debugger (Windows 7)

    It is a very specific question that applies to all versions of Visual Studio...

    Whenever you install the suite or Visual C++ on a system, it has its own internal debugger which replaces Dr. Watson by default whenever an application crashes.  This can be annoying, though, after you have uninstalled Visual Studio and she always wants to use just-in-time instead.

    I want to know how restore the Windows 7 debugger to DrWatson after that I completely remove Visual Studio 2013.

    I think the settings are

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug

    and

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug (on 64-bit systems)

    On a system where Visual Studio has not been installed there is no debugger and Auto entry.

    http://TechNet.Microsoft.com/en-us/library/cc939482.aspx

  • Is it possible to use &lt; af:message &gt; to display the validation model adf instead of the default note window

    For any component input, validation that we created at the level of the entities attribute are executed and if any validation fails, the messge is displayed in a window of default note on the component of the.

    Is it possible to use < af:message > to display the validation model adf instead of the window of default note for the corresponding component in a fragemnt jsff page?

    I use JDev 11.1.1.6.0.

    Thank you

    Jean Bayard

    Michelle,

    I have good news. I was able to reproduce, locate and bypass your problem.

    The problem is the following:

    works very well in JSF pages, but it does not work in JSF fragments (which are part of a glued TaskFlow, what is included in a page parent as a ) because ADF when executing a miscalculation of the value of of 'for' - attribute when it is part of a region BTF. For example, suppose that the has id = "it1" (as it is in your JSF fragment above) and this TaskFlow defined in included as a with id = "r1" in a parent page. Then the internal ID of the input text field will be 'r1:0:it1', but at runtime, the framework will set the value of 'for' - attribute to the 'r1:it1' (which is wrong) instead of "r1:0:it1" (which is the correct value).

    You can work around this bug by specifying:

    Instead of

    in your code above. In this way the framework will make up the correct value for the 'for' - attribute at run time and will not work correctly. Don't worry the caveat against a non-existent ID in the JDev source code editor.

    You must do this trick only in fragments JSF and you should not do in JSF pages.

    Dimitar

  • Why all the pop-up windows blocked, despite the option of popups block DO NOT checked?

    A few months previously, out of the blue, windows pop up never came on firefox.
    What I was doing was urgent, so I used IE (grrr!) instead.
    I still have this problem - despite the option 'block pop-up windows' is checked, work without popups.
    What can be wrong?
    Thanks for any help!

    Not related to your question, but your above posted system details see the several Console Java extensions.

    You can uninstall (remove) the Java Console extensions and disable the Java Quick Starter extension, you do not need to run Java applets.

    See http://kb.mozillazine.org/Java#Multiple_Java_Console_extensions

    See also http://www.java.com/en/download/help/quickstarter.xml - what is Java Quick Starter (JQS)? What is the advantage of running JQS? -6.0

    Disable the Java Quick Starter extension: Tools-> Addons-> Extensions

    Control Panel-> Java-> advanced-> various-> Java Quick Starter (disable)

  • Why does the download for Windows Geniuine servicing work?

    So I will try to get Windows Mobile Device Center for my Windows Phone 7 so I can transfer my dgital discto phone Unstoppable copy, however when I click on the link on the disc, he sends me here: http://www.microsoft.com/windowsmobile/en-us/help/getstarted/getstarted.mspx

    I click on the Windows Mobile Device Center for Vista Home Premium SP1, which sent me here: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=46f72df1-e46a-4a5f-a791-09f07aaa1914

    I then click on "Continue" to get the validation tool, which sends me here: http://www.microsoft.com/download/en/handoff.aspx?id=14&LegitCheckError=93

    When I click on "Continue" to start the process of validation, he sends here: http://www.microsoft.com/uk/windows/

    Now, if I want information about Windows 7 or Internet Explorer9; This page is very useful; but for the validation of my vopy of Windows Vista; That's about as much help as a door on a submarine.

    All I need is the tool of the servicing and the Mobile Device Center so I can watch a movie...

    Hello
    It of the liink or please repost in the correct phoneforum

    http://www.Microsoft.com/genuine/validate/

Maybe you are looking for