Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhz2t-00068m-JQ for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jul 2018 15:16:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fhz2r-0004Hq-8K for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jul 2018 15:16:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhz2q-0004Hj-Uw for pgsql-hackers@lists.postgresql.org; Tue, 24 Jul 2018 15:16:13 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fhz2n-0006TM-7c for pgsql-hackers@lists.postgresql.org; Tue, 24 Jul 2018 15:16:12 +0000 Received: by mail-wr1-x444.google.com with SMTP id e7-v6so4521305wrs.9 for ; Tue, 24 Jul 2018 08:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hl0GbkQYrTPPeUGOTaVY+wRKYLxX0W92GRASa2Hl+CI=; b=DK61R1+WiS47Uk9rQ84SXWj6SY/WOg/2gmBBHHpg/zngZUDRqEdZJmeRaNTlcc40dt BfmwrXSZFKUHUHqQyBqXYOChbi2DFyjJgw7u3qXFqeeQ0ahyRLP4GsDq+UMS+tkfapwT EpzenvqFOYZIJHJmSPCDAwDZmr3QyXa1pbzsAnNgFZuULZaOMtgsu0XovdTCFuRWefYY ISX2yPQkyqYcMw9S4JwgPSl+eOZOvtLZpKYMQ1ZbBnxkYwBPj6eVaMxVMR5MKBDXWMyG Ar7D1Ea/xfFpOdBW//1GBk/6zrtjmcW57Qeu0iz9vHofdVFNNuda6vzMBCAyMU6wcf0Q de8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hl0GbkQYrTPPeUGOTaVY+wRKYLxX0W92GRASa2Hl+CI=; b=mD1nFzBzElupT7wkXIn6FHhyHAV4N+cK2wDBkkahrYAajzzHgFlODX6TRKsTy0HT4O Nonp7URQxE9jp88R/RKpxvumCU7NoV98fJHlDzQiIpDdQaFw0A/9LClNGjOtnuGNhqRl rkXBMqwy0CoEUMRvnCRuV86tIiQ31goBV+A4xR6rkHd254tI4Km433llLfaTms7b1YT/ uDopRCBwwnfzlGfe6/riBxhDc0ZJModI1c9P/0zCdtXhvXyg6Ln8p7TkNmyM4b4NXYdq fpeRlZ2JixNgZUx5OdLfy0U4QCW4XnGyKt4qFDvzkPu90vwWmA6HY0rCtmPWTJFPmhv4 xVlw== X-Gm-Message-State: AOUpUlHlJ/O1tY92b9Vky+mvJw7TXUzxwOXN2oGkqNnTbdVsbA3ldUc8 K4f7WH1rx2Z6EewjpH9nIFnLPC6acqj9oX5lAtvYWKtGM7hY/MthIhL6HoP6CdilrR6ORoPaCdF PbakfCSVj52+aTmaGJ8TdNZohygLr/eIJ1zbxjbr/1JnGx+z+pXUhX2C+FlXzGYwlsBdY9W4RXy YvX96Xgqc9KiGnj6bKHuo= X-Google-Smtp-Source: AAOMgpe8fHb2q9/uKjq0s6FPn3u13lpuW7VFR+EFvzGtxb/KFJ+y/X9X5/uONrutWWtkdJUhaUuqqw== X-Received: by 2002:a5d:438d:: with SMTP id i13-v6mr12471659wrq.156.1532445367780; Tue, 24 Jul 2018 08:16:07 -0700 (PDT) Received: from [10.137.2.21] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id z5-v6sm14836903wrv.2.2018.07.24.08.16.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 08:16:06 -0700 (PDT) Subject: Re: GSOC 2018 Project - A New Sorting Routine To: Kefan Yang Cc: Andrey Borodin , Peter Geoghegan , "alvherre@2ndquadrant.com" , PostgreSQL Hackers References: <57ae7691-6dc8-d6d0-361a-a7269e656273@2ndquadrant.com> <00147235-69d3-d4f0-36c1-198d630af7ad@2ndquadrant.com> <1C5B17F1-D37F-4730-A2E4-EB7288C6DC09@yandex-team.ru> <78b9c822-e127-5250-a01c-4c51a50c82bd@2ndquadrant.com> <5b4fad82.1c69fb81.7a6f6.d32b@mx.google.com> <58417882-04e3-b23e-b53e-7d0720558335@2ndquadrant.com> <5b5654cc.1c69fb81.5ea44.d698@mx.google.com> From: Tomas Vondra Message-ID: Date: Tue, 24 Jul 2018 17:16:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5b5654cc.1c69fb81.5ea44.d698@mx.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/24/2018 12:21 AM, Kefan Yang wrote: > Hi Tomas! > > I did a few tests on my own Linux machine, but the problem is that my > resources on AWS(CPU, RAM and even Disk space) are very limited. I > considered establishing virtual machine on my own PC but the performance > is even worse. > > My original patch has two main optimizations: (1) switch to heap sort > when depth limit exceeded (2) check whether the array is presorted only > once at the beginning. Now I want to test these optimizations > separately. On AWS EC2 instance, regressions on CREATE INDEX cases seems > to be less significant if we use (1) only, but I can only test up to > 100000 records and 512MB memory using your scripts. > > So would you mind re-running the tests using the two patches I provided > in the attachment? That will be very helpful > I can do that, but it'll have to wait a couple of days. I'm currently using the boxes for some other tests. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services