Default page size - linux

How does BDB 4.3.28 select the page size for a newly created database on Linux?
I've been tracking down a lot of DB performance and resource issues that we've been hitting ever since we upgraded our Linux from 2.4.20 to 2.6.21. One big problem I've run into is that most of my databases are being created with a page size of 1K when running on Linux 2.6. On linux 2.4, they were all created with page sizes of 4K. I never explicitly set the page size before. In the code running on Linux 2.6, I'm explicitly setting the page size to 4K using the set_pagesize(4096) method which solves my immediate problem, but I still want to understand why the page sizes changed out from under me in the first place.

It's based on the block size of the underlying file system. Unless Berkeley can't figure it out for some reason, the default page size should match the block size of the file system.
For example, on my Solaris boxes if I create a DB on a UFS file system I'll get a default size of 8k. If I create it on a ZFS file system, it's 16k.
- Brian Roach

Similar Messages

  • Default page size for printing

    Is there a way to configure (i.e., specify non-programatically) the default page size to use when printing in Java? We have several JREs installed on a single Solaris machine. It seems that all but the one that came installed with the OS defaults to a an ISO-A4 page size.
    I wrote a test program (see end of post) and compiled using a 1.2.2 JDK. Here are some results:
    $ /usr/java/bin/java -cp . PrintPageFormat
    Java version: 1.2.2
    Page size: 612.0 x 792.0 pts
    $ /opt/java-packages/jre-1.4.0_04-solaris-i586/bin/java -cp . PrintPageFormat
    Java version: 1.4.0_04
    Page size: 595.0 x 842.0 pts
    $ /opt/java-packages/jre-1.4.2_08-solaris-i586/bin/java -cp . PrintPageFormat
    Java version: 1.4.2_08
    Page size: 595.0 x 842.0 pts
    $ /opt/jre-1.5.0_04-solaris-i586/bin/java -cp . PrintPageFormat
    Java version: 1.5.0_04
    Page size: 595.2755813598633 x 841.8897399902344 pts
    I've searched the Internet, but cannot find how to go about setting the default page size for a JRE. I've opened a ticket with Sun, and was told you can't do this other than programatically. It seems unreasonable that I would have to recompile my existing applications just to get them to work correctly under newer JREs. Is Sun's response to my ticket correct???
    Thanks in advance!
    Chris Rorvick
    [email protected]
    ============================================================
    import java.awt.print.*;
      public class PrintPageFormat
          public static void main(String[] args)
              PrinterJob pj = PrinterJob.getPrinterJob();
              PageFormat pf = pj.defaultPage();
              double w = pf.getWidth();
              double h = pf.getHeight();
              String version = System.getProperty("java.version");
              System.out.println("    Java version: " + version);
              System.out.println("    Page size: " + w + " x " + h + " pts");
      }

    This problem was fixed by setting the locale variable LC_CTYPE to "C" or "en_US". The JREs 1.4.0 and above deployed on our Linux and Solaris environments all have the system property 'java.awt.printerjob' set to 'sun.print.PSPrinterJob'. This is a subclass of sun.print.RasterPrinterJob which in turn is a subclass of java.awt.print.PrinterJob. So, PSPrinterJob is the actual class of the PrinterJob returned by PrinterJob.getPrinterJob(). Looking at the code of RasterPrinterJob:
            /* Default to A4 paper outside North America.
            String defaultCountry = Locale.getDefault().getCountry();
            if (!Locale.getDefault().equals(Locale.ENGLISH) && // ie "C"
                defaultCountry != null &&
                !defaultCountry.equals(Locale.US.getCountry()) &&
                !defaultCountry.equals(Locale.CANADA.getCountry())) {
                double mmPerInch = 25.4;
                w = Math.rint((210.0*ptsPerInch)/mmPerInch);
                h = Math.rint((297.0*ptsPerInch)/mmPerInch);
                newPaper.setSize(w, h);
                newPaper.setImageableArea(ptsPerInch, ptsPerInch,
                                          w - 2.0*ptsPerInch,
                                          h - 2.0*ptsPerInch);
            }This should have been fairly obvious. Java's locale settings depend on the platform's locale settings (i.e., LC_ variables in this case), and then the default page size is determined (or actually altered) based on that.
    I'm kicking myself for not figuring this out much sooner. I would hope Sun is, too! (not me, themselves)

  • How do I get Distiller to render other than the default page size

    I have double ad I laid out in Illustrator and I need to make a PDF with the Bleed/Trim/Color bars/ETC. In the past I could print to postscript file and run it through distiller, but after distilling, only an 8x11 is created.  I've gone into the edit settings and created another preset that has the default page size set to the size I need it, but it seems counterproductive and not what I'm used to.  Is there something that I'm missing?
    Note: When generating the PS file I've tried selecting both my printer ppd and the device independent option.

    Working in Mac Illustrator CC. Acrobat XI
    I go to Print with these settings:
    Drag the postScript File onto Distiller (Tried various preset settings)
    And I get this – an 8.5 x 11 portion:
    I've also tried printing with my printer PPD:

  • How do you change default page size in pdf?

    I purchased CREATE solely to create a pdf file from a scanned document. I created the PDF but the default page size is 30.15 x 20.83 INCHES. I cannot seem to change the page size. I called support services 4 times (talking with Sakthivel, Shashank, Medhet, and one other.) Each time they indicated that they would connect me to the correct people and they disconnected. I want some answers please. This seems to be a simple question. Is Adobe CREATE merely a scam?

    CreatePDF, perhaps?  Try the forum at http://forums.adobe.com/community/createpdf

  • Can Reader pick up the Default Page Size of a printer that is not the Windows Default Printer?

    We have a web based application that generates PDF documents via Crystal Reports.
    We are using Adobe Reader 8
    The PDF pages are displayed within an Internet Explorer window where the the users then print the document.
    The application is designed so the user only gets one chance to print the document (ie they cant come back and change printer settings if they happen to print the document out incorrectly)
    The document needs to be printed on A3 paper, full duplex.
    We have a printer set-up decidated to the printing of the documents generated by this application.  The default page size of this printer is set of A3.
    If we set this dedicated printer as the Windows Default Printer we have no problems at all.  The default page size (A3) is picked up and the document is printed correctly.
    If any other printer is set as the Windows Default Printer (eg one that has a default page size of A4), the users must obviously select the correct printer from the Print Dialogue Box -however when the user selects the dedicated A3 printer, the page size remains as A4 (page size of the Windows Default Printer).  This means the user must remember to change the paper size to A3 each time.
    Out users find IT a struggle at the best of times - anything that makes the process simpler is very welcomed!
    Is there a way to ensure the default page size of the printer is respected when that printer is not the Windows Default Printer?
    Thanks!

    No.

  • Change the Default Page Size for WebI

    Hello Experts,
    We have requriement where we need to change the default page size and margins for WebI, I have change the page size in defaultconfig.xml but don't see any options for Margins, How do I change the default margins?
    Any help or suggestion would be highlt appereciated.
    Thanks,
    Nishith

    From what I am finding it doesn't seem to be possible in 3.x, I could be wrong and someone might chime in with a workaround but at least it was added in 4.0
    -Dave

  • Change the Default page size to 980px?

    Is there a way to set a default page size? In other words, if i want a website that is larger than 700px wide, do i have to change the size of the page and resize all of the content on every page i create? or can i make 980px the default and not have to resize all the content every time?

    I just looked at that. I haven't used albums to be honest but, iWeb will not allow the copying the album for whatever reason. I have been copying the photo's template for my photo pages.
    http://www.jeffnitschke.com/Web.html
    http://orangesold.com/4376Riverway

  • Change Printer Default Page size to A4 from Letter in Firefox

    Firefox overides printer default page size every time I print. I need Firefox to print to A4 but it automatically sets the Page size to Letter. I have to manualy change the size each time I print.
    There are no options in Firefox to change this setting permanently. I am running the latest version of Firefox on Windows XP.
    In control panel the default page size is set to A4 which Internet Explorer and other applications use correctly.
    Thanks,

    I solved it! For anyone having a similar problem try this.
    Change the default printer, choose another one.
    Change something in that printer and close firefox.
    Reopen firefox and choose yet another printer (not the first one).
    Change something in that printer and close firefox again.
    Reopen firefox and choose the first printer. Select A4 as default paper and close firefox one last time.
    Reopen firefox and the problem should be gone. Weird, innit?

  • Change default page size

    When printing a front panel the default page size is letter. My windows printer has A4 as default page size. LabView always overrides my printer's default page size to letter.
    The problem: I want to print programmatically the front panel. With the page size letter I get a broad left and bottom margin on the A4 page. I didn't find a possibility to change the default page size programmatically or manually.
    I use LabView 2011 on Windows Vista.
    Thank you for your help
    Stefan

    Hi Stefan,
    i couldn`t find a programmtically way to set the page size to A4 in LabView. You can change parameters like orientation and print method (Postscript..), but i couldn`t find methods to determine windows printer dialog options.
    A possible work around would be, to use System Exec VI to perform a print command on a prior LabView created report file (Word or PDF). There are several command line print tools on the web.
    Kind regards
    Thomas Frank

  • Can I change the default page size for SYSBUILD?

    When I start SYSBUILD it always has a default page size of Letter set, is there any way to change this as most of the blocks I wish to print are to be printed on A3 paper?
    Many thanks
    Tim

    Hi Tim,
    Unfortunately there is no option to change the default print settings for SystemBuild. You must manually select the A3 paper size under File>>Page Setup.
    Thanks for the suggestion though, I will pass that on to R&D as a product suggestion for a future release.
    Regards,
    Jeff M.
    Applications Engineering
    National Instruments

  • BEx Web Printing - Default Page size

    Hi All,
    Is it possible to change the Default Page size in Web Printing options. Currently SAP have A4 as the default page size.
    Thanks
    Niveda

    Hello Niveda,
    Just wanted to let you know that we are also looking for that possibility. If we find a solution then I will post it here.
    Regards,
    József.

  • PIXMA MG8220 default page size for printing is set incorrectly to 6x4, need Letter

    I have a PIXMA MG8220, and the default page size for printing is set incorrectly to 6x4, I need it to be Letter paper size. I'm wasting a lot of paper, and cannot figure how to reset the defaults on the printer vs. individual laptops using the printer?Simon

    Hi simonp, To set the paper size to be printed on, please follow these steps: 1.  Open an application such as TextEdit. 2.  Go up to File and select Print, or press the CMD+P keys on your keyboard. 3.  Locate the PAPER SIZE field, then select the LETTER paper size. 4.  Look for the drop-down menu labeled PRESETS, then expand this menu and choose SAVE AS.
    5.  Type in a name of your choice for this default setting, then click OK.
    You will now be able to select the above created preset from any application you print from, with the default paper size being Letter.  Hope this helps!

  • How do I set a default page size, orientation, and printer for a particular document in Pages?

    I have a simple label document in Pages which I print to my label printer. The label is 1.49 x 3.47 inches and needs to print in Landscape, and it needs to print to my Dymo label printer. How do I set up the Page Setup or Print Setup so it defaults to this document size, orientation, and printer, every time, without me having to manually enter those settings every time?

    Thank you for your reply. However, I could not get Templates to work correctly for me.  Following your instructions, I opened my document, opened Page Setup, set the printer, paper size, orientation, and printed a copy to make sure it was right. Then I re-opened Page Setup to verify that the settings were still correct. Then I saved the document as a Template. Then I found my template in Pages, opened the template, and tried to print. The first thing I noticed was that the template did not remember my printer. Then I set the printer, and printed, but I found that the template also did not remember the page size or the document orientation. So, did I miss a step here? Lion 10.7.5 and Mac Mini.

  • How to Setup Default Page Size for Multiple Printers

    I've got two printers, a laser printer for printing "normal" 8 1/2 x 11 pages and a Zebra label printer for printing 4x6 shipping labels. I have my laser printer set as the default printer with a default paper size of US letter. Whenever I go to print shipping labels on my Zebra printer, I switch the printer in the Print dialog box and it always defaults to a paper size of "Full Bleed 8 1/2 x 11". Is there any way to change this setting so that it defaults to "4x6"?
    Another interesting thing is that if I temporarily set the Zebra printer up to be the default printer, none of the paper sizes that are "appropriate" for this printer appear in the default paper size popup menu. It looks like the choices are only those that would make sense for my laser printer. But when I go to print with my label printer, I can choose all sorts of "appropriate" sizes from the dialog box, including the "4x6" size that I use.
    Any ideas?

    Stop the queue (or take the printer offline manually), queue a print job, and check the settings on the submitted job using the CUPS interface; see if you can get the print job "captured" in the queue, and then see if the job is asking for the page size.  Based on what you're describing, I'd guess that whatever application or tool you're printing from is specifically requesting the page size, and not defaulting it.

  • Change default page size in iWeb?

    Is it possible? How do you do it?
    At the moemnt I am having to adjust each and every page manually and that takes ages.
    Will
    http://web.mac.com/digitographer/iWeb/DementiaScotland/Home.html

    I am using a software called iWebsites which can change the default page. This way I can open another new page making it the default preference and possibly change its size. Normally, I get the size thing correct in the first place. Some images survive well as gifs while others are retained as jpgs. I don't oversize my pixs. It's just for display ...
    Joe

Maybe you are looking for