Yes, it works
Go and check out Solaris Desktop for the details. The only challenge is in downloading the file. Then you will be able to enjoy PyCharm on IllumOS, stormOS, OpenIndiana, Solaris, Nexenta, SmartOS etc.
François
@f_dion
pip install fake-factory
Master the shell environment
python -m cProfile myscript.py
from time import sleepwe get:
def x():
sleep(4)
def y():
sleep(5)
def z():
sleep(2)
x()
y()
z()
print("outta here")
help(), dir(), see()
pip install see
sudo apt-get install pylint
pylint your_filename.py
pip install -r requirements.txt
from some_module import somethingIn your .bashrc or .profile, add:
export PYTHONSTARTUP=$HOME/.env.pyWhat it does: When you login and open a terminal, the environment variable PYTHONSTARTUP will be set, and when you execute python (or bpython, too), the python interpreter will load whatever scripts are in PYTHONSTARTUP and be ready for you to use them without having to type them everytime. In this example, I could use functionality something of some_module right away.
python -i script.pyWhat it does: At the conclusion of the execution of script.py, instead of exiting, the python interpreter stays in interactive mode, with everything ready to be printed or debugged.
I finally ran Povray 3.5 benchmark 1.02 on the exact same hardware and here are the results:
Hardware:
Dell GX260
Pentium 4 2.4GHz
512MB ram
Hitachi 40 GB 7200 rpm
ATI Radeo 7500
Under Windows 2000 SP4, official Povray 3.5 win32 release:
Time for Parse: 2 seconds
Time for Photon: 54 seconds
Time for Trace: 36 min 47 seconds
Total time: 37 min 43 seconds
Under Solaris 10 B69, Blastwave Povray 3.5 x86
Time for Parse: 7 seconds
Time for Photon: 1 min 12 seconds
Time for Trace: 53 min 14 seconds
Total time: 54 min 33 seconds
![]() |
| Which one is my blood pressure?? |
I finally had a few minutes to play around with povray and dtrace this afternoon. I followed the suggestion made by Adam Leventhal on his Blog to run:And that is how a one liner dtrace script helped in debugging my performance problem with Povray. The nice thing is that you didn't even need the source to know what exactly what was going on in the code, in real time, without step by step debugging.
# dtrace -n 'pid$target:::entry{ @[probefunc] = count() }' -p <process-id>
(replace <process-id> by the pid of povray)
So what I did is run povray, get its process id with ps, then run the above. Once it rendered line 1, I ctrl-c. dtrace then spit out what I needed to know. I dont have any reference to compare as to what optimisation was done exactly on the windows build. However, running the above dtrace command on that process does reveal something:
I know it is spending a lot of time in DNoise / Noise, because it's called a bazillion times. Actually almost 10million times for the pair - the only other call that is called as much is memcpy, haven't investigated yet from where, but there might be an opportunity to combine memcpy. It also points out that a fast FSB and faster memory will definitely pull in front for equal cpu.
Anyway, back to Povray, looking at texture.cpp (line 169 and following):
/*****************************************************************************/
/* Platform specific faster noise functions
support */
/* (Profiling revealed that the noise functions can take up to 50%
of */
/* all the time required when rendering and current compilers
cannot */
/* easily optimise them efficiently without some help from
programmers!) */
/*****************************************************************************/
#if USE_FASTER_NOISE
#include "fasternoise.h"
#ifndef FASTER_NOISE_INIT
#define FASTER_NOISE_INIT()
#endif
#else
#define OriNoise Noise
#define OriDNoise DNoise
#define FASTER_NOISE_INIT()
#endif
Haha! Fasternoise.h (only found in the Windows source, not the Unix source) includes
/*****************************************************************************/
/* Intel SSE2
support */
/*****************************************************************************/
#ifndef WIN_FASTERNOISE_H
#define WIN_FASTERNOISE_H
#ifdef USE_INTEL_SSE2
int SSE2ALREADYDETECTED = 0 ;
DBL OriNoise(VECTOR EPoint, TPATTERN *TPat) ;
void OriDNoise(VECTOR result, VECTOR EPoint) ;
#include "emmintrin.h"
#include "intelsse2.h"
#undef ALIGN16
#define ALIGN16 __declspec(align(16))
#endif
#endif
BTW, with DTrace it only took me a few minutes total (including running povray for 3 minutes) to identify the culprit. Under windows it would have taken me hours.
So on Solaris x86, need to add USE_INTEL_SSE2 and USE_FASTER_NOISE as compile switches and add fasternoise and the various other includes from the windows source to the unix source.
$ dtrace -lP python*
ID PROVIDER MODULE FUNCTION NAME
1044 python1905 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
1045 python1905 libpython2.6.so.1.0 dtrace_return function-return
1046 python1939 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
1047 python1939 libpython2.6.so.1.0 dtrace_entry function-entry
1048 python1939 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
1049 python1939 libpython2.6.so.1.0 dtrace_return function-return
1050 python1945 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
1083 python7640 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
1084 python7640 libpython2.6.so.1.0 dtrace_return function-return
1100 python11695 libpython2.6.so.1.0 dtrace_entry function-entry
1101 python11695 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
1102 python11695 libpython2.6.so.1.0 dtrace_return function-return
1103 python11699 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
1214 python11693 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
1215 python11693 libpython2.6.so.1.0 dtrace_entry function-entry
1219 python11699 libpython2.6.so.1.0 dtrace_entry function-entry
1220 python11699 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
1221 python11699 libpython2.6.so.1.0 dtrace_return function-return
1226 python11693 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
1227 python11693 libpython2.6.so.1.0 dtrace_return function-return
1228 python11695 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
2248 python1905 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
2249 python1905 libpython2.6.so.1.0 dtrace_entry function-entry
2250 python23832 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
2251 python23832 libpython2.6.so.1.0 dtrace_entry function-entry
2260 python7640 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
2261 python7640 libpython2.6.so.1.0 dtrace_entry function-entry
2315 python23832 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
2316 python23832 libpython2.6.so.1.0 dtrace_return function-return
7670 python2936 libpython2.6.so.1.0 dtrace_entry function-entry
7671 python2936 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
7672 python2936 libpython2.6.so.1.0 dtrace_return function-return
7750 python14523 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
7751 python14523 libpython2.6.so.1.0 dtrace_entry function-entry
7752 python14523 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
7753 python14523 libpython2.6.so.1.0 dtrace_return function-return
12339 python1945 libpython2.6.so.1.0 dtrace_entry function-entry
12340 python1945 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
12341 python1945 libpython2.6.so.1.0 dtrace_return function-return
12345 python2936 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
12347 python1219 libpython2.6.so.1.0 PyEval_EvalFrameEx function-entry
12348 python1219 libpython2.6.so.1.0 dtrace_entry function-entry
12349 python1219 libpython2.6.so.1.0 PyEval_EvalFrameEx function-return
12350 python1219 libpython2.6.so.1.0 dtrace_return function-return
# dtrace -n 'pid$target:::entry{ @[probefunc] = count() }' -p <process-id>
# dtrace -qZn 'python$target:::function-entry{ @[copyinstr ( arg1 )] = count() }' -c ./pingpong.py
[...]
register 10
abstractmethod 15
__new__ 17
<genexpr> 35
<module> 48
exists 49
S_IFMT 53
S_ISDIR 53
isdir 56
makepath 100
normcase 100
abspath 113
isabs 113
join 113
normpath 113
ping_pong 1000
checksum 4000
close 4000
do_one 4000
fileno 4000
receive_one_ping 4000
send_one_ping 4000
__init__ 4007
fdion@raspberrypi ~/zfs $ sudo apt-get install fuse-utils libfuse-dev libfuse2
fdion@raspberrypi ~/zfs $ sudo apt-get install libaio-dev libattr1-dev attr
fdion@raspberrypi ~/zfs $ sudo apt-get install git scons
fdion@raspberrypi ~ $ mkdir zfs
fdion@raspberrypi ~ $ cd zfs
fdion@raspberrypi ~/zfs $ git clone https://bitbucket.org/cli/zfs-fuse-arm.git
fdion@raspberrypi ~/zfs $ cd zfs-fuse-arm/
fdion@raspberrypi ~/zfs/zfs-fuse-arm $ cd src
fdion@raspberrypi ~/zfs/zfs-fuse-arm/src $ scons
[a lot of stuff will scroll by]
fdion@raspberrypi ~/zfs/zfs-fuse-arm/src $ sudo scons install
[again, more stuff will scroll by]
fdion@raspberrypi ~/zfs/zfs-fuse-arm/src/zfs-fuse $ sudo sh run.sh &
fdion@raspberrypi ~/zfs/zfs-fuse-arm/src/zfs-fuse $ cd
fdion@raspberrypi ~ $ cd zfs
fdion@raspberrypi ~/zfs $ mkdir test
fdion@raspberrypi ~/zfs $ cd test
fdion@raspberrypi ~/zfs/test $ dd if=/dev/zero of=fakedisk1 bs=1024k count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 10.2747 s, 10.2 MB/s
fdion@raspberrypi ~/zfs/test $ dd if=/dev/zero of=fakedisk2 bs=1024k count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 10.7517 s, 9.8 MB/s
fdion@raspberrypi ~/zfs/test $ sudo zpool create mymirror mirror /home/fdion/zfs/test/fakedisk1 /home/fdion/zfs/test/fakedisk2
fdion@raspberrypi ~/zfs/test $ cd
fdion@raspberrypi ~ $ mkdir myfilesystem
fdion@raspberrypi ~ $ sudo zfs create mymirror/myfilesystem -o mountpoint=/home/fdion/myfilesystem
fdion@raspberrypi ~ $ sudo chown fdion:pi myfilesystem/
fdion@raspberrypi ~/myfilesystem $ cp /etc/*.conf .
cp: cannot open `/etc/fuse.conf' for reading: Permission denied
fdion@raspberrypi ~/myfilesystem $ ls
adduser.conf gssapi_mech.conf libaudit.conf pnm2ppa.conf
asound.conf hdparm.conf logrotate.conf resolv.conf
ca-certificates.conf host.conf mke2fs.conf rsyslog.conf
colord.conf idmapd.conf mtools.conf sensors3.conf
debconf.conf insserv.conf nsswitch.conf sysctl.conf
deluser.conf ld.so.conf ntp.conf ts.conf
gai.conf libao.conf pam.conf ucf.conf
fdion@raspberrypi ~/myfilesystem $ sudo zfs list
NAME USED AVAIL REFER MOUNTPOINT
mymirror 191K 63.3M 22K /mymirror
mymirror/myfilesystem 89.5K 63.3M 89.5K /home/fdion/myfilesystem
fdion@raspberrypi ~/myfilesystem $ sudo zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
mymirror 95.5M 196K 95.3M 0% 1.00x ONLINE -
fdion@raspberrypi ~/myfilesystem $