Problems setting shared_buffers to large value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Barry L. Geipel

    Problems setting shared_buffers to large value

    Hi all,



    I am running postgres 7.4.2 on a Dual processor Opteron with 16GB of ram. I
    want to set shared_buffers to a large value, but I am running into startup
    problems.



    I have set my kernel SHMMAX and SHMALL to 12GB.



    When I set shared_buffers to a value which puts the total shared memory
    usage over 1GB, my postgres server fails to start. Unfortunatly, I also
    cannot seem to get any logfile output out of my system (perhaps another
    question).



    Are there any hardcoded max values for shared_buffers? I noticed in the code
    that a uint32 is used for the page size which would mean a 4GB max. This is
    failing at much lower values.



    Sorry that I do not have a logfile output. Perhaps someone could help me
    turn my logfile on. I am passing -l logfile at startup, but my logfile
    remains empty.



    Thanks in advance



    Barry

    (barry@GeipelNe t.com


  • Joshua D. Drake

    #2
    Re: Problems setting shared_buffers to large value

    Hello,

    What operating system?

    Sincerely,

    Joshua D. Drake

    Barry L. Geipel wrote:
    [color=blue]
    > -->
    >
    > Hi all,
    >
    >
    >
    > I am running postgres 7.4.2 on a Dual processor Opteron with 16GB of
    > ram. I want to set shared_buffers to a large value, but I am running
    > into startup problems.
    >
    >
    >
    > I have set my kernel SHMMAX and SHMALL to 12GB.
    >
    >
    >
    > When I set shared_buffers to a value which puts the total shared
    > memory usage over 1GB, my postgres server fails to start.
    > Unfortunatly, I also cannot seem to get any logfile output out of my
    > system (perhaps another question).
    >
    >
    >
    > Are there any hardcoded max values for shared_buffers? I noticed in
    > the code that a uint32 is used for the page size which would mean a
    > 4GB max. This is failing at much lower values.
    >
    >
    >
    > Sorry that I do not have a logfile output. Perhaps someone could help
    > me turn my logfile on. I am passing -l logfile at startup, but my
    > logfile remains empty.
    >
    >
    >
    > Thanks in advance
    >
    >
    >
    > Barry
    >
    > (barry@GeipelNe t.com
    >[/color]


    --
    Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
    Postgresql support, programming shared hosting and dedicated hosting.
    +1-503-667-4564 - jd@commandpromp t.com - http://www.commandprompt.com
    PostgreSQL Replicator -- production quality replication for PostgreSQL


    Comment

    • Tom Lane

      #3
      Re: Problems setting shared_buffers to large value

      "Barry L. Geipel" <barry@GeipelNe t.com> writes:[color=blue]
      > When I set shared_buffers to a value which puts the total shared memory
      > usage over 1GB, my postgres server fails to start.[/color]

      You definitely can't set shared memory to more than 2GB because its
      allocation arithmetic is done with ints. Not sure why it would fall
      over at 1GB, but it's more or less irrelevant anyway, because there is
      no earthly reason to make shared_buffers that high. You are much better
      off leaving the kernel to manage the bulk of your RAM. I don't know of
      any substantiated cases where it helped to make shared_buffers much
      larger than order-of-magnitude-of-10000 (80MB). 1GB will certainly be
      well past the point of diminishing returns.

      You can find more about this in the pgsql-performance archives, I believe.
      If not there, try older archives of the other lists.
      [color=blue]
      > Sorry that I do not have a logfile output. Perhaps someone could help me
      > turn my logfile on. I am passing -l logfile at startup, but my logfile
      > remains empty.[/color]

      Passing -l logfile to what?

      regards, tom lane

      ---------------------------(end of broadcast)---------------------------
      TIP 2: you can get off all lists at once with the unregister command
      (send "unregister YourEmailAddres sHere" to majordomo@postg resql.org)

      Comment

      Working...