Re: [HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread Alvaro Herrera
A.M. wrote: > That said, if postgresql is paging out, the DBA probably has postgresql > or the server misconfigured. Keep in mind that "paging in" in this context also means moving stuff from plain RAM into cache. -- Alvaro Herrerahttp://www.CommandPrompt.com/ T

Re: [HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread A.M.
On Mar 11, 2009, at 3:18 PM, Grzegorz Jaskiewicz wrote: On 11 Mar 2009, at 13:51, Marko Kreen wrote: Linux kernel is moving to use -Os everywhere. AFAIK their argument is that kernel code should not be doing anything CPU-intensive, thus minimal cache usage is more important than unrolled

Re: [HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread Grzegorz Jaskiewicz
On 11 Mar 2009, at 13:51, Marko Kreen wrote: Linux kernel is moving to use -Os everywhere. AFAIK their argument is that kernel code should not be doing anything CPU-intensive, thus minimal cache usage is more important than unrolled loops. This also seems to hint that -Os is not really approp

Re: [HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread Marko Kreen
On 3/11/09, Tom Lane wrote: > Heikki Linnakangas writes: > > Nikhil Sontakke wrote: > >> I was wondering why -Os is not used in place of -O2 while compiling the > >> Postgres sources with gcc. > > > > There's no free lunch. > > > In any case, this sort of choice is generally something that oug

Re: [HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread Greg Stark
On Wed, Mar 11, 2009 at 12:42 PM, Tom Lane wrote: > As far as I know, though, -Os > is not the preferred choice in any distro, which ought to tell you > something ... Unless of course you include distributions like ucLinux or emDebian which only proves the point. -- greg -- Sent via pgsql-hac

Re: [HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread Tom Lane
Heikki Linnakangas writes: > Nikhil Sontakke wrote: >> I was wondering why -Os is not used in place of -O2 while compiling the >> Postgres sources with gcc. > There's no free lunch. In any case, this sort of choice is generally something that ought to be applied at a distro level. If, say, Fedo

Re: [HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread Heikki Linnakangas
Nikhil Sontakke wrote: I was wondering why -Os is not used in place of -O2 while compiling the Postgres sources with gcc. I prepared 2 install directories by respectively using -Os and -O2 flags and in the former case it seems to reduce the install footprint by about 1MB or so. Agreed this is not

[HACKERS] gcc: why optimize for size flag is not the default

2009-03-11 Thread Nikhil Sontakke
Hi, I was wondering why -Os is not used in place of -O2 while compiling the Postgres sources with gcc. I prepared 2 install directories by respectively using -Os and -O2 flags and in the former case it seems to reduce the install footprint by about 1MB or so. Agreed this is not significant for nor