Hi...
Recently I bought an SSD (OCZ Vertex 3 120GB). I hoped to improve
performance together with cygwin. But some strange and unexpected things
happen.
My Setup:
Dell Optiplex 980. Core i5-760. 4 GB Ram. Windows 7 SP1 64bit. A 500GB
WDC WD5000AAKS harddrive and the new SSD. Windows 7 installed on SSD.
Cygwin 1.7.11 - up to date in all packages. Installed on drive D: (HD)
and on drive H: (SSD).
The SSD is a SATA III drive while my machine is only having SATA II, so
I am loosing some speed here but the SSD is in normal windows operations
still hell faster than the HD. I am also getting the maximum performance
which SATA II can deliver according to some benchmark tools. The SSD is
formatted to use 4k sectors. I also did a test with 512byte sectors
where I loose performance on write but the problems do not change. I
also copied the cygwin installation manually from D: to H: which made no
difference.
The 2 problem(s) as of now:
a) no permissions
When I am having cygwin installed on the SSD I have no permissions on
cygwin's files. On none of them.
Example /bin/bash
Cygwin on HD:
$stat /bin/bash
File: `/bin/bash'
Size: 536078 Blocks: 524 IO Block: 65536 regular file
Device: 48f3fa60h/1223948896d Inode: 1125899907057137 Links: 1
Access: (0755/-rwxr-xr-x) Uid: (11000/ roland) Gid: (11001/ develop)
Access: 2012-03-20 13:59:02.953125000 +0100
Modify: 2012-01-03 15:32:06.000000000 +0100
Change: 2012-03-28 16:59:36.216999900 +0200
Birth: 2012-03-05 13:07:35.237439800 +0100
Cygwin on SSD:
$stat /bin/bash
File: `/bin/bash'
Size: 536078 Blocks: 524 IO Block: 65536 regular file
Device: aa325caah/2855427242d Inode: 281474976710756 Links: 1
Access: (0000/----------) Uid: (11000/ roland) Gid: (11001/ develop)
Access: 2012-03-29 09:19:13.486065800 +0200
Modify: 2012-01-03 15:32:06.000000000 +0100
Change: 2012-03-29 09:19:13.486065800 +0200
Birth: 2012-03-29 09:19:13.486065800 +0200
As you can see the access flags are 0 on ssd. So I straced it.
Here are the (I think) relevant parts of it.
HD:
2512 52868 [main] stat 3636 lstat64: entering
26 52894 [main] stat 3636 normalize_posix_path: src /bin/bash
25 52919 [main] stat 3636 normalize_posix_path: /bin/bash =
normalize_posix_path (/bin/bash)
25 52944 [main] stat 3636 mount_info::conv_to_win32_path:
conv_to_win32_path (/bin/bash)
25 52969 [main] stat 3636 set_flags: flags: binary (0x2)
24 52993 [main] stat 3636 mount_info::conv_to_win32_path: src_path
/bin/bash, dst D:\cygwin\bin\bash, flags 0x3000A, rc 0
52 53045 [main] stat 3636 symlink_info::check: 0xC0000034 =
NtCreateFile (\??\D:\cygwin\bin\bash)
30 53075 [main] stat 3636 symlink_info::check: 0xC0000034 =
NtQueryInformationFile (\??\D:\cygwin\bin\bash)
45 53120 [main] stat 3636 symlink_info::check: 0x0 = NtCreateFile
(\??\D:\cygwin\bin\bash.exe)
37 53157 [main] stat 3636 symlink_info::check: not a symlink
26 53183 [main] stat 3636 symlink_info::check: 0 =
symlink.check(D:\cygwin\bin\bash.exe, 0x28B860) (0x43000A)
25 53208 [main] stat 3636 path_conv::check:
this->path(D:\cygwin\bin\bash.exe), has_acls(1)
29 53237 [main] stat 3636 build_fh_pc: fh 0x6127435C, dev 0xC3
26 53263 [main] stat 3636 stat_worker:
(\??\D:\cygwin\bin\bash.exe, 0x28CBB0, 0x6127435C), file_attributes 8224
77 53340 [main] stat 3636 cygpsid::debug_print: get_sids_info:
owner SID = S-1-5-21-290147797-1639656955-1287535205-1000
27 53367 [main] stat 3636 cygpsid::debug_print: get_sids_info:
group SID = S-1-5-21-290147797-1639656955-1287535205-1001
26 53393 [main] stat 3636 get_info_from_sd: ACL 1ED, uid 11000,
gid 11001
47 53440 [main] stat 3636 fhandler_base::fstat_helper: 0 = fstat
(\??\D:\cygwin\bin\bash.exe, 0x28CBB0) st_size=536078, st_mode=0x81ED,
st_ino=1125899907057137st_atim=4F687F16.38CF8888
st_ctim=4F732758.CEF27DC st_mtim=4F031166.0 st_birthtim=4F54AC87.E270B38
31 53471 [main] stat 3636 stat_worker: 0 =
(\??\D:\cygwin\bin\bash.exe,0x28CBB0)
SSD:
2051 30843 [main] stat 2284 lstat64: entering
24 30867 [main] stat 2284 normalize_posix_path: src /bin/bash
18 30885 [main] stat 2284 normalize_posix_path: /bin/bash =
normalize_posix_path (/bin/bash)
18 30903 [main] stat 2284 mount_info::conv_to_win32_path:
conv_to_win32_path (/bin/bash)
18 30921 [main] stat 2284 set_flags: flags: binary (0x2)
17 30938 [main] stat 2284 mount_info::conv_to_win32_path: src_path
/bin/bash, dst H:\cygwin\bin\bash, flags 0x3000A, rc 0
41 30979 [main] stat 2284 symlink_info::check: 0xC0000034 =
NtCreateFile (\??\H:\cygwin\bin\bash)
21 31000 [main] stat 2284 symlink_info::check: 0xC0000034 =
NtQueryInformationFile (\??\H:\cygwin\bin\bash)
34 31034 [main] stat 2284 symlink_info::check: 0x0 = NtCreateFile
(\??\H:\cygwin\bin\bash.exe)
29 31063 [main] stat 2284 symlink_info::check: not a symlink
19 31082 [main] stat 2284 symlink_info::check: 0 =
symlink.check(H:\cygwin\bin\bash.exe, 0x28B860) (0x43000A)
18 31100 [main] stat 2284 path_conv::check:
this->path(H:\cygwin\bin\bash.exe), has_acls(1)
20 31120 [main] stat 2284 build_fh_pc: fh 0x612742EC, dev 0xC3
18 31138 [main] stat 2284 stat_worker:
(\??\H:\cygwin\bin\bash.exe, 0x28CBB0, 0x612742EC), file_attributes 32
55 31193 [main] stat 2284 cygpsid::debug_print: get_sids_info:
owner SID = S-1-5-21-290147797-1639656955-1287535205-1000
19 31212 [main] stat 2284 cygpsid::debug_print: get_sids_info:
group SID = S-1-5-21-290147797-1639656955-1287535205-1001
18 31230 [main] stat 2284 get_info_from_sd: ACL 0, uid 11000, gid
11001
33 31263 [main] stat 2284 fhandler_base::fstat_helper: 0 = fstat
(\??\H:\cygwin\bin\bash.exe, 0x28CBB0) st_size=536078, st_mode=0x8000,
st_ino=281474976710756st_atim=4F740CF1.1CF8C688
st_ctim=4F740CF1.1CF8C688 st_mtim=4F031166.0 st_birthtim=4F740CF1.1CF8C688
22 31285 [main] stat 2284 stat_worker: 0 =
(\??\H:\cygwin\bin\bash.exe,0x28CBB0)
In my eyes the main differences cut down to 2 lines.
HD :26 53263 [main] stat 3636 stat_worker:
(\??\D:\cygwin\bin\bash.exe, 0x28CBB0, 0x6127435C), file_attributes 8224
SSD:18 31138 [main] stat 2284 stat_worker:
(\??\H:\cygwin\bin\bash.exe, 0x28CBB0, 0x612742EC), file_attributes 32
The file_attributes differ
HD :47 53440 [main] stat 3636 fhandler_base::fstat_helper: 0 = fstat
(\??\D:\cygwin\bin\bash.exe, 0x28CBB0) st_size=536078, st_mode=0x81ED,
st_ino=1125899907057137st_atim=4F687F16.38CF8888
st_ctim=4F732758.CEF27DC st_mtim=4F031166.0 st_birthtim=4F54AC87.E270B38
SSD:33 31263 [main] stat 2284 fhandler_base::fstat_helper: 0 = fstat
(\??\H:\cygwin\bin\bash.exe, 0x28CBB0) st_size=536078, st_mode=0x8000,
st_ino=281474976710756st_atim=4F740CF1.1CF8C688
st_ctim=4F740CF1.1CF8C688 st_mtim=4F031166.0 st_birthtim=4F740CF1.1CF8C688
st_mode differs
Beside of that cygwin appears to operate normally (as far as I can tell
as of now).
b) speed
I did a small testdrive with compiling the gdb sources as of tonight. I
extracted them to /tmp on each of the installations.
HD:
$time ./configure
real 0m16.630s
user 0m5.407s
sys 0m7.815s
$time make -j 4
real 4m55.995s
user 4m27.627s
sys 4m0.979s
SSD:
$time ./configure
real 0m17.628s
user 0m5.333s
sys 0m9.970s
$time make -j 4
real 5m27.127s
user 4m29.529s
sys 4m45.653s
????
Not exactly the speed I hoped to get. The compile on SSD is even slower
than on HD.
I did the same compile test using an old whacky mingw/msys and I could
see at least
a speed increase of about 15%.
Any clues where these problems could come from?
Thanks,
Roland
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple