Darius, thanks for reporting this problem. It indeed seems that something might be going wrong in MonetDB in your case --- without more details about what exacly you do (i.e., the DB scheman, the data and the queries you rung that trigger the segfault, I can only vaguely guess that runnign with 16 as opposed to 8 threads triggers some race condition. I do think, though, that the conclusion that this is due to hyperthreading is pre-mature. The most we can conclude so far it that increasing parallelism from 8 threads to 16 treads seems to *trigger* the segfault. The actual *cause* is yet unknown and requires detailed debugging to be found. We would very much apprechiate your helpt to at least share with us the details how to reproduce the segfault --- I'm not aware of any Linux machine with hyoerthreading that we have access to, but we do have acces to a Sun T1 with 6 cores and 4 hw threads per core ... You could also test yourself, whether, e.g., the problems occurs, too, if your machine has hyperthreading enabled, but you limit MonetDb to use only 8 core/thread by starting mserver5 with command line option --set gdk_nr_threads=8. I that works fine, you could try to find the actual degree of parallelism that triggers the segfault, e.g., by bisection between 8 & 16 threads ... Stefan ps: Likewise, the fact that MonetDB uses at most 50% with hyperthreading disabled needs to be analysed in detail --- MonetDB uses only as much memory as required for query processing ... On Fri, Apr 30, 2010 at 02:08:49PM -0400, dariuszs wrote:
The problem is HT (hyper-threading), eg. - writing out table output to disk. When I have Logical Processor enabled (BIOS), MonetDB thinks I have 16 cores, but my machine has only *8* (with 2 threads per core). So when I try to write the file out, the second thread will try to release the memory which has been already released by the first thread and will segfault. When I turn off Logical Processor - writing out files works, but MonetDB will use 50% of available memory at most. Dariusz.
Logical Processor Disabled root@monetdb:/var/MonetDB# mserver5 --version MonetDB server v5.18.5 (64-bit), based on kernel v1.36.5 (64-bit oids) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved Visit http://monetdb.cwi.nl/ for further information Found 47.3GiB available memory, 8 available cpu cores Configured for prefix: /usr Libraries: libpcre: 7.8 2008-09-05 (compiled with 7.8) openssl: OpenSSL 0.9.8g 19 Oct 2007 (compiled with OpenSSL 0.9.8g 19 Oct 2007) libxml2: 2.7.5 (compiled with 2.7.5) Compiled by: root@ubuntu-karmic-64 (x86_64-pc-linux-gnu) Compilation: gcc -O2 -Wall -O2 -O6 -fomit-frame-pointer -finline-functions -falign-loops=4 -falign-jumps=4 -falign-functions=4 -fexpensive-optimizations -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -ftree-vectorize Linking : ld -IPA -m elf_x86_64 -Wl,-Bsymbolic-functions
Logical Processor Enabled root@monetdb:/var/MonetDB# mserver5 --version MonetDB server v5.18.5 (64-bit), based on kernel v1.36.5 (64-bit oids) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved Visit http://monetdb.cwi.nl/ for further information Found 47.3GiB available memory, 16 available cpu cores Configured for prefix: /usr Libraries: libpcre: 7.8 2008-09-05 (compiled with 7.8) openssl: OpenSSL 0.9.8g 19 Oct 2007 (compiled with OpenSSL 0.9.8g 19 Oct 2007) libxml2: 2.7.5 (compiled with 2.7.5) Compiled by: root@ubuntu-karmic-64 (x86_64-pc-linux-gnu) Compilation: gcc -O2 -Wall -O2 -O6 -fomit-frame-pointer -finline-functions -falign-loops=4 -falign-jumps=4 -falign-functions=4 -fexpensive-optimizations -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -ftree-vectorize Linking : ld -IPA -m elf_x86_64 -Wl,-Bsymbolic-functions
Dariusz.
Stefan Manegold wrote:
On Fri, Apr 30, 2010 at 01:33:08PM -0400, dariuszs wrote:
Hi, On processors that support SMT technology if Logical Processors are enabled your software segfaults,
Could you be more specific and verbose?
Does "it" (I suppose you mean MonetDB, in particular MonetDB5/SQL) segfault always (i.e., as soon as you start mserver5 or merovingian), or only under particular circumstances/workloads/situations?
I.e., how (if at all) could we reproduce the segfault(s)? (We cannot do much about problems without detailed description how to reproduce them ...)
In case we cannot reproduce the segfault, can you run MonetDB in a debugger and report where/how/why it segfaults?
if you disable Logical Processors it works but then you use half of the available memory. Dariusz.
How exactly do you come to the conclusion that MonetDB only uses half of the (physically) available memory in case Logical Processors ("Hyperthreading") are disabled? How are Logical Processors related to physical memory usage?
Stefan
Martin Kersten wrote:
Nafees Ur Rehman wrote:
Hi,
Does monetdb has support for parallel processing? If some can guide me on that.
What kind of parallel processing do you have in mind? It runs the queries in parallel on a multi-core engine. regards,Martin
Regards Nafees Ur Rehman
------------------------------------------------------------------------------ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 |