Difference in read/write between Windows Vs Linux

Hi,
Can you please write, whether it is a bug or my ignorance. I thought, if a java program runs in Windows then it will run in other platform too, without editing any code. It proved me wrong. So is it a bug?
Ref: Fedora linux version 5
Kernel ver. 2.6.17
jdk version - build 1.5.0_06-b05
I was working on a web service. The server side program connects to an application using socket program and sends back data to client.
While it was working very fine with Windows XP. When I moved the service to Linux (above said linux). The program stopped working. When I explored it, I found 3 things.
1. I was using PrintWriter
PrintWriter outputStream = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()), true);
to write into the socket. It works fine in Windows but not in Linux. ie. it sends different bytes in linux. Thus fails. When I changed it to BufferedOutputStream it works fine.
BufferedOutputStream outputStream = new BufferedOutputStream (socket.getOutputStream());
2. I was using BufferedReader to read
BufferedReader inputStream = new BufferedReader(new InputStreamReader(socket.getInputStream()));
data from socket. It reads. But byte varies from expectation. The same program works very well with windows.
I used DataInputStream now. that works. but..
DataInputStream inputStream = new DataInputStream(socket.getInputStream());
3. While reading it was suppossed to read 2098 bytes, instead it reads 1448 bytes. It reads correctly in Windows, but not in the above said linux.
Is it a bug or there is a difference in reading and writing from socket between Windows and Linux ( even though it is same JVM).
Thanks
Sasi.

Thanks a lot for both of you.
I believe, \r\n Vs \n could not be the reason.
Because, I was sending binary data.Then you should not be using Writer at all!
>
With regard to "utf-8", I thought of that but I did
not try to issue it in the function. Because, I was
trying to send and receive raw binary data.Then you should not be using Writer at all!
>
Now, You may ask that why did you use PrintWriter.
Because, the data had unsigned byte values. Makes no difference - you should not be using Writer at all!
So I
converted everything in to char array and send it.Will cause you problems at some point on some platform unless you use Base64 or HEX encoding.
especially, whereever unsigned byte was required, I
used (byte & Oxff). It worked very well with
Windows. So I just go ahead doing other things.I use byte & 0xff for dealing with unsigned valued but your use sounds dangerous.
>
Here my question is, I assumed that if a program is
written in java and complied on jvm x, then
irrespective of the underlying OS, if the jvm is the
same x, then the program should run without error. Is
it wrong. If it is not wrong, then is it a jre bug?Your program will work if you have not used any implicit or explicit platform dependencies. For example, if in your program then you have hard codes a path as "C:\Program Files" then it will work on Windows (but then only if it has a C drive) but not on Unix.
Any program has to deal with a number of platform specific features and Java protects you from them as much as possible BUT you must deal with things like Locale, EOL and default character encoding.
No! Of course it is not a jre bug. You have coded to a specific platform and are then are suprised when it fails on other platforms.
>
Did you see my third point of my original problem
statement. How to solve that.Since I don't have a view of your code I can't make an informed comment. I think I can guess what the problem is but I won't speculate.

Similar Messages

  • DBLoad utility: (huge) difference between Windows and Linux

    Hello
    I have a backfile of 55M entries to load. I have prepared it under Linux (Dual Core machine + 4GB - Mandriva distribution - java 1.6). When I run DbLoad, here is the (partial) log:
    java -Xmx2048m -jar /home/pd51444/jNplMatchBackfile_Main_0.2/lib/je-3.3.69.jar DbLoad -h . -s group.db -f group.db.txt -v
    loaded 2817812 records 63275 ms - % completed: 5
    loaded 5624893 records 141023 ms - % completed: 10
    loaded 8462602 records 962019 ms - % completed: 15
    loaded 11285385 records 2401566 ms - % completed: 20
    loaded 14094928 records 786746 ms - % completed: 25
    loaded 16914275 records 8965457 ms - % completed: 30
    loaded 19741557 records 15766560 ms - % completed: 35
    loaded 22567310 records 2226015 ms - % completed: 40
    loaded 25376363 records 19662455 ms - % completed: 45
    Then I copied the exact same file on my Windows laptop (dual core + 2GB - XP - java 1.6), and DbLoad goes much faster:
    C:\nplmatch\db>java -Xmx1024m -jar ..\jar\je-3.3.69.jar DbLoad -h . -s group.db -f group.db.txt -v
    Load start: Thu Oct 02 10:33:23 CEST 2008
    loaded 2817812 records 59876 ms - % completed: 5
    loaded 5624893 records 69283 ms - % completed: 10
    loaded 8462602 records 77470 ms - % completed: 15
    loaded 11285385 records 69688 ms - % completed: 20
    loaded 14094928 records 62716 ms - % completed: 25
    loaded 16914275 records 59122 ms - % completed: 30
    loaded 19741557 records 63200 ms - % completed: 35
    loaded 22567310 records 58654 ms - % completed: 40
    loaded 25376363 records 61482 ms - % completed: 45
    loaded 28197663 records 58889 ms - % completed: 50
    loaded 31019453 records 55937 ms - % completed: 55
    loaded 33839878 records 62045 ms - % completed: 60
    loaded 36664839 records 65749 ms - % completed: 65
    loaded 39498035 records 100718 ms - % completed: 70
    loaded 42302599 records 99733 ms - % completed: 75
    loaded 45125268 records 96000 ms - % completed: 80
    loaded 47947180 records 92749 ms - % completed: 85
    loaded 50755655 records 85485 ms - % completed: 90
    loaded 53578015 records 96240 ms - % completed: 95
    Load end: Thu Oct 02 10:57:36 CEST 2008
    Also I use the same je.properties file on both platforms.
    Any idea where this performance problem comes from?
    Thanks in advance
    Best regards
    Philippe

    Hello Phillipe,
    Nothing jumps out at me, but you might try the following:
    . Check the status of disk write caches. On linux, the cache may be disabled and it may be enabled on windows.
    . Does the windows machine have an SSD?
    . Run with -verbose:gc to see if the Linux is being held up by full GC's.
    . Use top or some other utility to see if something else is running on the linux box.
    . Take some random c-\'s to get some stack traces to see what is going on when things get slow.
    . Check on the JVM ergonomics. You may be getting a server or client JVM without knowing. Force it one way or the other with -server or -client.
    Here is a (future) FAQ entry regarding disk write caches (poorly formatted at the moment):
    During my system testing I pulled the power cord on my server to make the ultimate test of JE's durability claims. I am using commitSync() for my transactions, but some of the data that JE said it had committeed was not on disk when the system came back up. What gives?
    Quoting the Berkeley DB Reference Guide:
    Many disk drives contain onboard caches. Some of these
    drives include battery-backup or other functionality that guarantees that all
    cached data will be completely written if the power fails. These drives can
    offer substantial performance improvements over drives without caching support.
    However, some caching drives rely on capacitors or other mechanisms that
    guarantee only that the write of the current sector will complete. These
    drives can endanger your database and potentially cause corruption of your
    data.
    To avoid losing your data, make sure the caching on your disk
    drives is properly configured so the drive will never report that data has
    been written unless the data is guaranteed to be written in the face of a
    power failure. Many times, this means that write-caching on the disk drive
    must be disabled.
    Some operating systems enable the disk write cache by default.
    If you need true durability in the face of a power failure, then you should
    verify that the disk write cache is disabled or that you have some alternative
    means of ensuring durability (e.g. nvram, battery backup, an Uninterruptible
    Power Supply (UPS), Solid State Disk (SSD), etc.) Some disk drives may
    actually require changing hardware jumpers to enable/disable the write cache.
    You can check the status of the write cache using the
    hdparm utility on Linux and the format utility on Solaris.
    On Windows, use the Windows Explorer. Right click on
    the disk drive that you want to check, select Properties,
    click on the Hardware tab, select the desired disk, click
    on the Properties button, click on
    Policies and verify the cache setting with the check box.
    On Windows Server 2003 you generally disable the write caching
    from within the RAID controller software (OEM specific).

  • Different behaviour reading static field Windows vs Linux

    I have a class B that is a subclass of class A. Class A has a protected static field. In windows, reading this field from a static method of class B yields the desired results, meaning that the field has the value updated somewhere else. Running the same code in Linux, the field contains the value assigned to it at declaration time:
    It goes like this:
    package packageA;
    public class A
    protected static Collection items = new ArrayList();
    public static void addItem(Object item)
    items.add(item);
    } // class A
    package packageB;
    public class B
    extends A
    public static void methodA()
    System.out.println(A.modules.size());
    System.out.println(B.modules.getSize());
    System.out.println(modules.size());
    } // class B
    import packageA.A;
    import packageB.B;
    public static void void main(String[] args)
    Object item;
    item = new String("");
    A.addItem(item);
    B.method();
    } // main(String[])
    What is even more strange, is that if I run the above example in a new project, the results are as expected. But if I run this other project I am working on, the results are as if B.items is independent of A.items. Even if I implement a method A.getItems() and call it from B.method() to store the items in a variable local to B.method(), the result is an empty ArrayList.
    My first attempt was to place the A and B classes in the same package, and since the results were as expected, I changed each class to its own package and the Main class to an independent package. The results do not change in this scenario.
    Your help is appreciated.
    The environment is:
    Netbeans 5.5
    JRE 1.6.0-b105
    xubuntu (Linux 2.6.20-16-generic i686 GNU/Linux(
    Juan Carlos

    I have just noticed that the "odd" behaviour does not happen everywhere (but it does happen everytime).
    I realized that there is another part of code that references the same static field and the value in that case is the correct one.
    Also, while debugging under Netbeans (on the line of code that gives the unexpected value), the "tip" that is displayed when the cursor is placed over the name of the field, the value is correct.
    So I decided to check the Call Stack and noticed some Hidden Source Calls. They are hidden because of a call to LoginContext.login() Furthermore, that call results in a call to AccessController.doPrivileged()
    Could that be the problem? If so, how do I solve it. At this point I am lost here, I don't have an idea of where to go now.
    Thanks.
    JC

  • Which partition format to choose to make second internal drive read/write for Windows 7

    Hi,
    I have a new Mac Mini Server 2011 and I would like to split partition my second internal hard drive to use in Bootcamp Windows 7.
    I would like to split this drive so that I can have one partition in NTFS and other half in standard MAC OS format.
    Ive gone to Disk utility to split partition this drive but I only see the Format MS Dos (FAT) and FatEX.. I dont see FAT32 ! Is this correct..
    should I choose Ms DOs FAT so that when I got back to Bootcamp Windows I can reformat this partition into NTFS?
    Thanks community..
    loving the new Mac btw

    FAT is FAT32 is MSDOS
    exFAT is FATex
    Disk Utility select second drive media
    Hit the partition tap, select big box click 2 partitions,
    select 1 partition format OS X extended, select the other partition format MSDOS click Apply.
    https://discussions.apple.com/message/16276201#16276201
    Because you have a unusual setup, I don't know exactly how Bootcamp is going to handle it, you got to download the drivers and read the PDF.
    However when you insert the Windows 7 DVD to install, you first need to change the MSDOS/FAT32 format to NTFS using the Windows disk, Disk Utility or Bootcamp won't do it.
    https://www.apple.com/support/bootcamp/

  • What are the difference is read/write speeds of PATA (ATA 100) and SATA?

    I am thinking of putting a SATA HDD in my Super Drive bay of my Early 2008 MacBook Pro (NON-Unibody) and I am currious of what the difference is in speeds of these connectors. The optical drive's connector is an ATA100 and I found a OptiBay that converts the SATA into ATA100. I know there is a difference but only plan on putting Music and other media files on the HDD. Thanks for any help!

    http://www.ebay.com/itm/NEW-2nd-HDD-SSD-caddy-SuperDrive-for-Macbook-pro-PATA-ID E-early-2008-non-unibody-/300664242498?pt=US_Drive_Bay_Caddies&hash=item4600fc41 42
    This is the adapter I found and it seems to be what I am looking for. What do you think?

  • Difference in Ram Usage between Windows 8.1 and Windows 8.1 PRO

    Before getting any Version of windows I would Like to know how much is the ram difference with a fresh installation of Windows 8.1 VS Windows 8.1 PRO, Since I doubt I would use some services/applications of Windows 8.1 and if I disable some services would
    reduce the ram usage up to Windows 8.1 levels? Thanks

    Trust me, you're going to want to reconfigure a lot of Windows 8.1's features.  It kind of stinks
    as configured right out of the box.  One good tool to do that with is the
    Local Group Policy Editor (gpedit.msc), and you only get that with Pro.
    I'd also suggest getting the 64 bit version if your hardware can run it.  It's the way of the future.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • Restore database from windows to linux

    Hi,
    I want to restore my Oralce in windows to another Linux box,
    my windows is windows 2003 R2 64bit, Oracle 11.2.0.2
    and my Linux is Oracle Linux 5.5, Oracle 11.2.0.3,
    I managed to create an instance in the linux box, restore the controlfile and datafile and catalog the archivelogs,
    but when I do recovery, below errors prompt
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 07/06/2012 14:54:44
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/cloudfs/archivelog/O1_MF_1_26954_7Z9K3WC0_.ARC'
    ORA-10562: Error occurred while applying redo to data block (file# 6, block# 669493)
    ORA-10564: tablespace TEST
    ORA-01110: data file 6: '+DATA/ofs5/datafile/test.264.787934051'
    ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 91719
    ORA-00600: internal error code, arguments: [ktbair2_0], [2239], [3712], [], [], [], [], [], [], [], [], []
    is that mean it is not possible to restore the db from one platform to another?
    (I read some oralce note that it is possible to setup datagurad between window and linux)
    Thank
    Vincent

    Vincent;
    is that mean it is not possible to restore the db from one platform to another?It's possible, but there's quite a lot of planning that needed to be done.
    The Database Backup and Recovery User's Guide should have a section on Transporting Data Across Platforms.
    http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmxplat.htm
    You need to use dbms_tdb.check_db to test if it can be done with the OS's you have in mind.
    There's a fairly good example here, but not using the exact OS's you have in mind.
    http://mohamedazar.com/2011/06/08/transport-an-entire-database-to-a-different-platform/
    My understanding is it won't transport certain items :
    Control files and Redo logs
    Bfiles
    Temp files
    External tables
    Directories
    Password files
    Also you need to create a new instance before you can use RMAN backups from the source.
    Here's another example :
    https://blogs.oracle.com/AlejandroVargas/entry/database_migration_from_window
    Best Regards
    mseberg

  • What is the difference between 11i for LInux (VS) 11i for Windows

    Hi,
    I have downloaded 11i E-Business suit for Windows and
    Installed it successfuly.
    I am having problem with windows plateform regarding listner, connection manager, service host, rpc all these stopping/terminating by itself and system rebooting.
    I would like to install 11i on Linux.
    Q1. Which files I need to download again?
    Q2. Is there any script I need to run for LInux?
    I have run adautostg.pl and it hasnot given me any error for start cd but when it came to appl_top it said as "This is for windows, continue any way" and I said yes. so it made stage.
    I can't run setup as user Oracle as it is not allowed to write on disk, can u also give me suggestion about that?
    I am installing 11i on single node.
    Q3. I can use the same files of windows for linux as
    I saw some .sh shell commands and
    startcd/rapidwiz/adautostg.pl is also used in
    unix/linux.
    Warm Regards,
    Rashid.

    I have run installation of 11i for windows on Linux plateform and now I would like to share it with u all.
    1. I run adautostg.pl by using command $perl adautostg.pl and it has staged all the startcd disks without any error.
    2. when it came to other cdies it has prompted me as "this file if for windows; continue any way" and I pressed ok and it has staged all the files without any furthur error.
    3. After it, I have made the necessary adjustments to run rapidwiz command and it run successfully. Now it has copied all the 113 files successfuly.It has run adrun9i.sh and is giving me error on process 5. (at 20% of installation) that it cannot run files
    adcctclean.sql INSTE8
    adclobconv.sql INSTE8
    adclobtmp.sql INSTE8
    adcmclean.sql INSTE8
    adcrdb.sh INSTE8
    adcrdbrdlg.sh INSTE8
    adcrobj.sh INSTE8_APPLY
    adcrobj.sql INSTE8
    addbccnv.sql INSTE8
    addbprf.sh INSTE8
    addbprf.sql INSTE8
    addbupdgsm.sql INSTE8
    adlicnse.sql INSTE8
    adsvdb.sh INSTE8
    adsvdcnv.sh INSTE8
    adsvdlsn.sh INSTE8
    adupdlib.sql INSTE8
    afdbprf.sh INSTE8_PRF
    afdbprf.sql INSTE8
    afmkinit.sh INSTE8_SETUP
    Directory: /mnt/hda7/proddb/9.2.0/appsutil/install
    adlnkoh.sh INSTE8
    Directory: /mnt/hda7/proddb/9.2.0/appsutil/scripts/PROD_localhost
    adautocfg.sh INSTE8
    adchknls.pl INSTE8_SETUP
    addbctl.sh INSTE8
    addlnctl.sh INSTE8
    adpreclone.pl INSTE8
    adstopdb.sql INSTE8
    adstrtdb.sql INSTE8
    config.c INSTE8
    successfuly. I think these files are required for linux installation and are found in linux cdies "RDBMS".
    If someone can send me these 11i files for linux at [email protected] I will proceed furthur and will let u know what will happend next in experiment :)

  • IndexOf - difference between Win and Linux encoding

    Hello folks, wondering if someone could put me on the right track over this little problem with porting a java app to Linux...
    I have a nice little program, developed on (the latest) JDK under windows which reads a custom file format, locates the second occurance of the substring 'PNG', ignores everything before the character before this PNG (hence the -1 below) and saves the remainder, which is now a bog-standard PNG image. The first 'PNG substring always occurs within the first 50 bytes (hence the 50 below) and the second around the 2kB mark. Here's the line that finds the location of the second 'PNG' in the file loaded into strFileContent:
    location = strFileContent.indexOf( "PNG", 50 )-1;All is well compiled and run on windows, say file 'test1.xyz' produces a value for location of 2076 and saves a nice PNG called 'test1.png'.
    When I haul it over to Linux (Ubuntu 9.04) and lo, location comes out as 1964 for the same file, and of course the file is no-longer a PNG because there are an extra 112 bytes on the front end. Running the windows compile of the code or a fresh Linux compile makes no difference.
    I'm suspecting Win and Linux Java count, perhaps, line endings or some such differently, perhaps have to check an encoding. I'd appreciate any pointers on correcting this to work on both platforms (ultimately I'm trying to appease a Mac user, but don't have a Mac to play with at the moment).
    Cheers,
    K.
    Ken

    phaethon2008 wrote:
    I'm suspecting Win and Linux Java count, perhaps, line endings or some such differently, perhaps have to check an encoding. I'd appreciate any pointers on correcting this to work on both platforms (ultimately I'm trying to appease a Mac user, but don't have a Mac to play with at the moment).The immediate cause of your problem is probably that Windows uses a 8bit encoding as the default (probably some ISO-8859-{noformat}*{noformat} variant or the Windows-bastardization of it), while Ubuntu uses UTF-8, which has a varying number of bytes per character.
    The much more important underlying problem is that you're trying to treat binary data as if it were text. A PNG image is not text. Handling binary data in Strings (or char[]) is a sure way to invite desaster.
    You must convert your code to handle InputStream/OutputStream/byte[] instead of Reader/Writer/String/char[].

  • Differences on Windows and Linux JVM about java.util.zip package

    Hello, there!
    I need some help if someone else has already face this problem.
    I have a Java server that process the bytes of a SWF File stored in the server and ouptut it to the user through a Servlet. The file was decompressed and re-compressed using the java.util.zip package (Deflater/Inflater).
    Everything works fine on Windows Server 2008 server. But now we need to migrate the server to Linux. The problem is that when I test the website now, the file seens to be corrupted.
    What really intrigues me is that everything runs normal on Windows Server configuration, when changed to Linux, the final file seens to be corrupeted... what could possible be the cause? Is there any difference between java.util.zip package on Window and Linux JVM?
    My Windows Server is:
    . Windows Server 2008 (6.0 - x86)
    . Apache 2.2.11
    . Tomcat 6.0.16.0
    . Java JDK 1.6.0_12-b04
    My CentOS Server is
    . CentOS 5.4 (2.6.18-164.15.1.el5 - i386)
    . Apache 2.2.3
    . Tomcat 6.0.16.0
    . Java JDK 1.6.0_12-b04
    Please, if someone could give me a lead, I would appreciate very much!
    Thank you all in advance,
    CaioToOn!

    ejp wrote:
    Thank you for the answer, but no. The path is correct.That's not what he meant. Zip file/directory entries are supposed to use / as the path separator. It is possible to use \ but such Zip files will only work under Windows. You may have erred here.Ohhh, I had really missunderstood what Ray said. But, I still think that this is not the problem, since the ZIP is a single SWF file generated by Flex SDK 3.4 and compressed in the ZLIB open standard (as in page 13, at [http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf|http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf] ). This is how Flash Compiler compress the files.
    jschell wrote:
    If the above suggestions do not solve the problem...Specify in detail with the exact steps used how you determined that it was corrupted.The reason why I believe the SWF is getting corrupted is that when it is loaded by Flash Player (in the client-side) the Player throws a VerifyError: Error # 1033. The [documentation says (see error 1033)|http://help.adobe.com/en_US/AS3LCR/Flash_10.0/runtimeErrors.html] that this error means that the SWF file is corrupted.
    As I said, what intrigues me is that this work perfectly in a Windows Server 2008 server. I just had setup a CentOS server and deployed the application. The client-remains unchanged, so why could the result change?
    raychen wrote:
    I would remove the side effect you are doing and send the file straight through, with decompress and compress, the servlet. It is more likely that you have a bug in your swf processor than the zip library.
    I had already tried it when first coding, in Windows Server 2008, it had not worked.
    Thank you all for the help.
    CaioToOn!

  • Windows Server 2012 - Hyper-V - iSCSI SAN - All Hyper-V Guests stops responding and extensive disk read/write

    We have a problem with one of our deployments of Windows Server 2012 Hyper-V with a 2 node cluster connected to a iSCSI SAN.
    Our setup:
    Hosts - Both run Windows Server 2012 Standard and are clustered.
    HP ProLiant G7, 24 GB RAM, 2 teamed NIC dedicated to Virtual Machines and Management, 2 teamed NIC dedicated to iSCSI storage. - This is the primary host and normaly all VMs run on this host.
    HP ProLiant G5, 20 GB RAM, 1 NIC dedicated to Virtual Machines and Management, 2 teamed NIC dedicated to iSCSI storage. - This is the secondary host that and is intended to be used in case of failure of the primary host.
    We have no antivirus on the hosts and the scheduled ShadowCopy (previous version of files) is switched of.
    iSCSI SAN:
    QNAP NAS TS-869 Pro, 8 INTEL SSDSA2CW160G3 160 GB i a RAID 5 with a Host Spare. 2 Teamed NIC.
    Switch:
    DLINK DGS-1210-16 - Both the network cards of the Hosts that are dedicated to the Storage and the Storage itself are connected to the same switch and nothing else is connected to this switch.
    Virtual Machines:
    3 Windows Server 2012 Standard - 1 DC, 1 FileServer, 1 Application Server.
    1 Windows Server 2008 Standard Exchange Server.
    All VMs are using dynamic disks (as recommended by Microsoft).
    Updates
    We have applied the most resent updates to the Hosts, WMs and iSCSI SAN about 3 weeks ago with no change in our problem and we continually update the setup.
    Normal operation
    Normally this setup works just fine and we see no real difference in speed in startup, file copy and processing speed in LoB applications of this setup compared to a single host with 2 10000 RPM Disks. Normal network speed is 10-200 Mbit, but occasionally
    we see speeds up to 400 Mbit/s of combined read/write for instance during file repair
    Our Problem
    Our problem is that for some reason all of the VMs stops responding or responds very slowly and you can for instance not send CTRL-ALT-DEL to a VM in the Hyper-V console, or for instance start task manager when already logged in.
    Symptoms (i.e. this happens, or does not happen, at the same time)
    I we look at resource monitor on the host then we see that there is often an extensive read from a VHDX of one of the VMs (40-60 Mbyte/s) and a combined write speed to many files in \HarddiskVolume5\System Volume Information\{<someguid and no file extension>}.
    See iamge below.
    The combined network speed to the iSCSI SAN is about 500-600 Mbit/s.
    When this happens it is usually during and after a VSS ShadowCopy backup, but has also happens during hours where no backup should be running (i.e. during daytime when the backup has finished hours ago according to the log files). There is however
    not that extensive writes to the backup file that is created on an external hard drive and this does not seem to happen during all backups (we have manually checked a few times, but it is hard to say since this error does not seem leave any traces in event
    viewer).
    We cannot find any indication that the VMs themself detect any problem and we see no increase of errors (for example storage related errors) in the eventlog inside the VMs.
    The QNAP uses about 50% processing Power on all cores.
    We see no dropped packets on the switch.
    (I have split the image to save horizontal space).
    Unable to recreate the problem / find definitive trigger
    We have not succeeded in recreating the problem manually by, for instance, running chkdsk or defrag in VM and Hosts, copy and remove large files to VMs, running CPU and Disk intensive operations inside a VM (for instance scan and repair a database file).
    Questions
    Why does all VMs stop responding and why is there such intensive Read/Writes to the iSCSI SAN?
    Could it be anything in our setup that cannot handle all the read/write requests? For instance the iSCSI SAN, the hosts, etc?
    What can we do about this? Should we use MultiPath IO instead of NIC teaming to the SAN, limit bandwith to the SAN, etc?

    Hi,
    > All VMs are using dynamic disks (as recommended by Microsoft).
    If this is a testing environment, it’s okay, but if this a production environment, it’s not recommended. Fixed VHDs are recommended for production instead of dynamically expanding or differencing VHDs.
    Hyper-V: Dynamic virtual hard disks are not recommended for virtual machines that run server workloads in a production environment
    http://technet.microsoft.com/en-us/library/ee941151(v=WS.10).aspx
    > This is the primary host and normaly all VMs run on this host.
    According to your posting, we know that you have Cluster Shared Volumes in the Hyper-V cluster, but why not distribute your VMs into two Hyper-V hosts.
    Use Cluster Shared Volumes in a Windows Server 2012 Failover Cluster
    http://technet.microsoft.com/en-us/library/jj612868.aspx
    > 2 teamed NIC dedicated to iSCSI storage.
    Use Microsoft MultiPath IO (MPIO) to manage multiple paths to iSCSI storage. Microsoft does not support teaming on network adapters that are used to connect to iSCSI-based storage devices. (At least it’s not supported until Windows Server 2008 R2. Although
    Windows Server 2012 has built-in network teaming feature, I don’t article which declare that Windows Server 2012 network teaming support iSCSI connection)
    Understanding Requirements for Failover Clusters
    http://technet.microsoft.com/en-us/library/cc771404.aspx
    > I have seen using MPIO suggests using different subnets, is this a requirement for using MPIO
    > or is this just a way to make sure that you do not run out of IP adressess?
    What I found is: if it is possible, isolate the iSCSI and data networks that reside on the same switch infrastructure through the use of VLANs and separate subnets. Redundant network paths from the server to the storage system via MPIO will maximize availability
    and performance. Of course you can set these two NICs in separate subnets, but I don’t think it is necessary.
    > Why should it be better to not have dedicated wireing for iSCSI and Management?
    It is recommended that the iSCSI SAN network be separated (logically or physically) from the data network workloads. This ‘best practice’ network configuration optimizes performance and reliability.
    Check that and modify cluster configuration, monitor it and give us feedback for further troubleshooting.
    For more information please refer to following MS articles:
    Volume Shadow Copy Service
    http://technet.microsoft.com/en-us/library/ee923636(WS.10).aspx
    Support for Multipath I/O (MPIO)
    http://technet.microsoft.com/en-us/library/cc770294.aspx
    Deployments and Tests in an iSCSI SAN
    http://technet.microsoft.com/en-US/library/bb649502(v=SQL.90).aspx
    Hope this helps!
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Lawrence
    TechNet Community Support

  • Difference in reading a text file in Windows & Unix

    I have a code which is working fine in windows but is stopping after reading the first line of a text file in
    Unix. The code is something like below:-
    declare
    file_handle text_io.file_type; /*running form*/
    filename varchar2(60);
    v_line varchar2(200);
    begin
    message('before fopen');
    filename:=:file_name;message(filename);
    file_handle:=text_io.fopen(filename,'R');
    loop
    begin
    text_io.get_line(file_handle,v_line);
    --:line:=v_line;
    exception
    when no_data_found then
    text_io.fclose(file_handle);
    message('NO MORE DATA IS FOUND ');
    temp:='stop';
    exit;
    when others then
    text_io.fclose(file_handle);
    message('ERROR ');
    exit;
    end;
    mob_no:=substr(v_line,1,10);
    begin
    message(' Mobile NO is '||mob_no);
    message(' Mobile NO is '||mob_no);
    exit when temp='stop';
    end loop;
    commit;
    message('File SUCCESSFULLY LOADED........');
    message('File SUCCESSFULLY LOADED........');
    end;
    Is there any difference in reading a text file in Windows & Unix.
    I hope, my question is clear. Please help in solving the doubt as it is urgent.
    Regards.

    There is no difference in reading a file - you use TEXT_IO in the normal way. However there is of course a difference in the format of text files between Unix and Dos so if you had say transferred your test file from Dos to the Unix box for testing strange things might happen if you had not transferred in ASCII mode.

  • Data Doubler - Format for both OSX and Windows 7 to read/write?

    Hello! I have a Mid-2012 MacBook Pro 13" and I've ordered the OWC Data Doubler with a 1.5TB HDD to put into the optical bay. I have a couple of questions.
    1. What format should I use for the HDD to allow both my OSX and Windows 7 sides read and write to it? I have a Bootcamp partition, but if it's possible I'd like for both OSX and W7 to be able to read and write to this drive. That way, when I'm in OSX I can view iTunes and media, but if I'm in W7 I can still have the same access. That way, I don't have to worry about "Oh, I downloaded this on the windows side ... I have to figure out how to get it over to the mac side" (or vice versa). Essentially allowing the 1.5TB HDD to be a "go between" for the two.
    2. This is a minor question, but will the eject button do something to the HDD if it gets pressed when the optical drive is out and the HDD/Data Doubler is in? I don't plan on pressing it, but I was wondering if I need to dig into terminal (or somewhere else) to "disable" the button or maybe just reassign it so that instead of ejecting it does some other function?
    I have heard of "MacDrives" for Windows, but I haven't used it. If this is a better option (to put the HDD into Mac OS Extended Journaled and use an application to allow W7 to read/write) that's fine.
    I am putting in the 1.5TB HDD. The end goal, if possible, is to allow the Windows 7 side to read/write to it. As long as it's not a "hacked together" method, I do not mind what way it's done.
    Any thoughts? I appreciate it!

    Use Winclone for the Windows partition and CCC for the OSX partition.

  • Difference between windows server 2008 and windows small buisness server

    dear,sir/madm
    i need a differeces between windows small buisness server and winndows server 2008.
    plz get me perfect answer
    regards,
    Abhilash

    Hello,
    main difference are that SBS is limited to 75 users and not able to create a trust. Also it comes with additional software like Exchange and SQL depending on  the license you use.
    The regular server version do NOT contain any application or server as SBS. This must be  bought separate. Also there is no user limit and tursts are allowed.
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://msmvps.com/blogs/mweber/
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • When I start Firefox, my computer slows to a crawl; the problem is that between every operation, the disk reads/writes for about a minute.

    I have an old (~6 yrs) HP laptop running Win XP. I've scanned for viruses, deleted temp files, etc, and defraged the hard drive. After doing a fresh boot, all works OK until I start Firefox (3.6.6), and then every mouse click sends the hard drive into read/write mode for up to a minute. Just writing this memo has taken eight minutes; going to my bank site and setting up a transfer (about 12 mouse clicks) took 16 minutes (!).
    Things other than Firefox continue to be plagued by the same problems, after starting and closing Firefox. Opening an Explorer window can take up to three minutes. Closing Firefox doesn't seem to solve the problem - I need to reboot to do that.
    Any thoughts?

    Start Firefox in Safe Mode (above). Wait a few minutes, then close Firefox.
    Is there still a problem?
    If you are still having issues;
    Type '''about:support''' in the address bar and press '''Enter.'''
    Under the main banner, press the button; '''Copy Text To Clipboard.'''.
    Then in the reply box at the bottom of this page,
    do a right click in the box and select '''Paste.'''
    This will show us your system details.
    '''No Personal Information Is Collected.'''
    Start your '''Computer''' in safe mode with networking. Then start Firefox.
    '''[http://encyclopedia2.thefreedictionary.com/Linux+Safe+Mode Starting The Computer In Safe Mode;<br>Free Online Encyclopedia]'''

Maybe you are looking for