Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A0324633382 for ; Mon, 2 Nov 2009 10:16:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 60521-08 for ; Mon, 2 Nov 2009 14:16:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f168.google.com (mail-ew0-f168.google.com [209.85.219.168]) by mail.postgresql.org (Postfix) with ESMTP id 7733D6330BE for ; Mon, 2 Nov 2009 10:16:18 -0400 (AST) Received: by ewy12 with SMTP id 12so897117ewy.0 for ; Mon, 02 Nov 2009 06:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=yS0BbGpqHUB/w8WKvn7C39CtgDtK/rXSC7EFizgYeUI=; b=THz31vBbDq+ub3ioJ03GHchPL7nouqaTHsmO4es5b763WJcTYOmIEEY81aaadMJfNZ tXNVhu2uaZLZUdsPuRz+I0uTWepNy5ST+ecNtYZnHvLtseEq1fa7HMlMKw9HuaqB0rwn IyuONSZgMqFDyCVp8W+CljmhK1cjygGGrBcgw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kXu1ZUYmYXkDv8xhsC243hntNSLFMUtJVndHUZc6pBD0Ow1sh0GOKXTnrxe6Xr52bf lUbbYfTizQNiTp3VWs0v8ZnYPagB9gDrXDayyYPLsvMx8OEIplKGLcARsRbjKWXlEpIm bbgYVpoSPsl5dPMZEbhf5PWQgJnOAJ4k1kHxw= MIME-Version: 1.0 Received: by 10.216.89.202 with SMTP id c52mr4600637wef.215.1257171375564; Mon, 02 Nov 2009 06:16:15 -0800 (PST) Date: Mon, 2 Nov 2009 16:16:15 +0200 Message-ID: Subject: Problem with database performance, Debian 4gb ram ? From: Grant Masan To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=0016e6d64b184328740477640585 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.298 tagged_above=-10 required=5 tests=AWL=1.300, BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200911/11 X-Sequence-Number: 36179 --0016e6d64b184328740477640585 Content-Type: text/plain; charset=ISO-8859-1 Hi Hi all, I have now readed many many forums and tried many different solutions and I am not getting good performance to database. My server is Debian linux, with 4gb ram, there is also java application and I am giving to that 512mb (JAVA_OPTS) memory. In database there is now like 4milj rows. What should I do better. Now .conf is: max_connections = 80 shared_buffers = 512MB temp_buffers = 8MB work_mem = 20MB maintenance_work_mem = 384MB wal_buffers = 8MB checkpoint_segments = 128MB effective_cache_size = 2304MB cpu_tuple_cost = 0.0030 cpu_index_tuple_cost = 0.0010 cpu_operator_cost = 0.0005 fsync = off checkpoint_timeout = 1h and I am giving kernels like: sysctl -w kernel.shmmax=1073741824 sysctl -w kernel.shmall=2097152 btw, what file I should modify to give this kernels as defaults ? Thank you very much ! Hope you can clear my problem ! --0016e6d64b184328740477640585 Content-Type: text/html; charset=ISO-8859-1 Hi Hi all,

I have now readed many many forums and tried many different solutions and I am not getting good performance to database. My server is Debian linux, with 4gb ram, there is also java application and I am giving to that 512mb (JAVA_OPTS) memory. In database there is now like 4milj rows. What should I do better.
Now .conf is:

max_connections = 80
shared_buffers = 512MB
temp_buffers = 8MB
work_mem = 20MB
maintenance_work_mem = 384MB
wal_buffers = 8MB
checkpoint_segments = 128MB
effective_cache_size = 2304MB
cpu_tuple_cost = 0.0030
cpu_index_tuple_cost = 0.0010
cpu_operator_cost = 0.0005
fsync = off
checkpoint_timeout = 1h

and I am giving kernels like:

sysctl -w kernel.shmmax=1073741824
sysctl -w kernel.shmall=2097152

btw, what file I should modify to give this kernels as defaults ?

Thank you very much ! Hope you can clear my problem !
--0016e6d64b184328740477640585--