Hi Josh, Yes, the new I/O libraries are designed for random access. They take more or less directly from POSIX, rather than trying to follow the myriad Java APIs.
Minor From: Josh Milthorpe <josh.miltho...@anu.edu.au> To: x10-users@lists.sourceforge.net, Minor Gordon/Watson/Contr/IBM@IBMUS, Sascha Roloff <sascha.rol...@googlemail.com> Date: 01/17/2011 05:50 PM Subject: Re: [X10-users] X10_NTHREADS slowdown with IO Hi Sascha, aside from any inefficiencies in x10.io, I suspect that the problem is that your IO is single threaded. In other words, one thread reads the file while the others wait for some work. Unfortunately, those threads are "busy waiting", and constantly interrupting the IO thread to attempt to steal work. This is known to slow down single threaded sections. https://jira.codehaus.org/browse/XTENLANG-1012 It may be possible to do multi-threaded IO, using random access similar to e.g. Java's FileChannel. However there is currently no X10 IO class that supports this. https://jira.codehaus.org/browse/XTENLANG-1254 Minor, does your IO rewrite include random access files? Cheers, Josh On 18/01/11 02:46, Minor Gordon wrote: > Hi Tetsu, > > The current x10.io library is known to perform very poorly in general, not > just in parallel code. We are currently working on a rewrite of it that > should have much better performance. > > Cheers, > Minor > > > > > From: Tetsu Soh<tetsu.soh....@gmail.com> > To: Mailing list for users of the X10 programming language > <x10-users@lists.sourceforge.net> > Date: 01/17/2011 10:09 AM > Subject: Re: [X10-users] X10_NTHREADS slowdown with IO > > > > Hello, > > I met same problem too. I tested and confirmed that both Java and C++ > back-end have this problem. > > Test is very easy. Just reads a large file (for me, 80M) and throws the > data away. Uses -INIT_THREADS/$X10_NTHREADS to control how many threads > should be active. > > Another thing I notice is that more threads you used, more times > consumed by GC. Even though you do not allocate any objects with these > threads. > > However, the I/O problem seems less related to GC. This problem confused > me over 2 months. :( > > Thanks > -Tetsu > > On Thu, Jan 13, 2011 at 7:25 PM, Sascha Roloff > <sascha.rol...@googlemail.com > >> wrote: >> > >> Dear list, >> >> I'm writing an X10 application which is suitable to parallelise. I work >> > on > >> an Intel Quad Core CPU and want to use 4 Threads. I changed X10_NTHREADS >> accordingly. The results are ok, I got almost a linear speedup at the >> calculations. But there is one problem. I also have to read a big >> > imagefile > >> at the beginning and this takes a lot more time, when I use more >> > Threads. > >> $ x10c++ -STATIC_CALLS -O -NO_CHECKS -o x10app Code.x10 >> >> $ export X10_NTHREADS=1 >> $ ./x10app >> read image data: 2336 ms >> calculation: 8290 ms >> >> $ export X10_NTHREADS=4 >> $ ./x10app >> read image data: 6129 ms >> calculation: 2330 ms >> >> Here is a code snippet of reading the image: >> >> comp1 = new Array[Int]((0..(height-1))*(0..(width-1))); >> comp2 = new Array[Int]((0..(height-1))*(0..(width-1))); >> comp3 = new Array[Int]((0..(height-1))*(0..(width-1))); >> >> for([i,j] in comp1) { >> comp1(i,j) = filereader.readByte()& 0xFF; >> comp2(i,j) = filereader.readByte()& 0xFF; >> comp3(i,j) = filereader.readByte()& 0xFF; >> } >> >> I don't understand, maybe someone can help me? >> >> Sascha >> >> >> > ------------------------------------------------------------------------------ > >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> X10-users mailing list >> X10-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/x10-users >> >> > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users > ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users