Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Most sensible creators of files that size, make them binary data with fixed-sized records. That way, individual records can be read without having to process the whole file in one serial progression. Or in one go.

Then all you need is a) the ability to see the remote file system from the local machine; b) the ability to seek or sysseek to positions > 2GB.

  • Achieving the former will be platform dependant and nothing to do with Perl.

    Under windows it is usually done with something like  NET USE \\remotemachine\remotedir x:

    For *nix, it will be some variation on the mount command.

  • For the latter, you need to check that the local perl was compiled with large file support.

    It is probably quite rare that anyone would build perl without this these days, but to verify it, you can do:

    perl -V:uselargefiles uselargefiles='define';

    If it says ='define', you're good to go. If is says: ='undef', you need to reinstall or recompile perl on your system.

So yes. Given the right infrastructural access to the remote file, and a suitable build of Perl, you can access that remote, terabyte-sized file using Perl.

Access will be relatively slow compared to local disc, but that's inevitable. Depending upon the nature of the processing involved, it may make sense to pull chunks of the file across to local disc for processing, before writing in-place back to the master; if required.

If accessing such large remote files is likely to become a regular requirement, and your machine is physically close (<100m) to the remote server, then setting up a dedicated 10 gigabit network connection is a possibility; though relatively expensive. A couple of 10GBASE-T cards ($1000), and a few meters of cable, and you can have a dedicated network between you and the remote file that runs fast enough to rival a locally attached disc. Whether the local and remote hardware is capable of exploiting that bandwidth is another question.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re: How to read 1 td file by BrowserUk
in thread How to read 1 td file by bhaskar_219

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found