11-17-2014
Quote:
Originally Posted by
kogorman3
Defragged? I'm not sure how to do that on Linux, so I am using a fresh 2-TB drive formatted ext4 and directing sort to use it for temporaries. It's otherwise empty.
ext4 partitions are relatively easy to defrag, being designed with runtime defragmentation in mind (yes, runtime -- no need to unmount) via the e4defrag utility. There's no point defragging an empty partition, but check that your input and output partitions aren't a mess after all this testing.
Quote:
I've got 32 GB RAM and a 64-bit CPU. That's big enough for the whole test file, but the parameters to sort don't let it work that way.
The process of merge-sorting doesn't work that way. No matter how big your buffers are, it has to do the same number of merges on the same number of elements of the same sizes, nearly all of them tiny... Starting with billions of 2-element merges, half the number of 4-element merges, etc, etc, etc. (A little oversimplification, but the merging options don't substantially change this.) That's why pushing buffers to ridiculous sizes is so little help -- they're nearly always dead weight except for the final merge, when it's never going to be big enough to matter anyway.
Last edited by Corona688; 11-17-2014 at 11:17 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to understand the webserver log file for an error which has occured on my live web site.
The webserver access file is very big in size so it's not possible to open this file using vi editor. I know the approximate time the error occured, so i am interested in looking for the log file... (4 Replies)
Discussion started by: sehgalniraj
4 Replies
2. Shell Programming and Scripting
Hi All
I have approximately 10 files that are at least 100+ MB in size. I am importing them into a DB to output them to the web. What i need to do first is clean the files up so i dont have un necessary rows in the DB. Below is what the file looks like:
Ignore the <TAB> annotations as that... (4 Replies)
Discussion started by: caddyjoe77
4 Replies
3. UNIX for Dummies Questions & Answers
How do we check 'large files' is enabled on a Unix box -- HP-UX B11.11 (2 Replies)
Discussion started by: ranj@chn
2 Replies
4. UNIX for Dummies Questions & Answers
I was wondering how sort works.
Does file size and time to sort increase geometrically?
I have a 5.3 billion line file I'd like to use with sort -u I'm wondering if that'll take forever because of a geometric expansion?
If it takes 100 hours that's fine but not 100 days.
Thanks so much. (2 Replies)
Discussion started by: dcfargo
2 Replies
5. Shell Programming and Scripting
hello all,
kindly i need your help, i made a script to print a specific lines from a huge file about 3 million line. the output of the script will be about 700,000 line...the problem is the script is too slow...it kept working for 5 days and the output was only 200,000 lines !!!
the script is... (16 Replies)
Discussion started by: m_wassal
16 Replies
6. Shell Programming and Scripting
Hello everyone!
I have 2 types of files in the following format:
1) *.fa
>1234
...some text...
>2345
...some text...
>3456
...some text...
.
.
.
.
2) *.info
>1234 (7 Replies)
Discussion started by: ad23
7 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I have problem with searching hundreds of CSV files, the problem is that search is lasting too long (over 5min).
Csv files are "," delimited, and have 30 fields each line, but I always grep same 4 fields - so is there a way to grep just those 4 fields to speed-up search.
Example:... (11 Replies)
Discussion started by: Whit3H0rse
11 Replies
8. Solaris
Hello everyone. Need some help copying a filesystem. The situation is this: I have an oracle DB mounted on /u01 and need to copy it to /u02. /u01 is 500 Gb and /u02 is 300 Gb. The size used on /u01 is 187 Gb. This is running on solaris 9 and both filesystems are UFS.
I have tried to do it using:... (14 Replies)
Discussion started by: dragonov7
14 Replies
9. UNIX for Advanced & Expert Users
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies
10. Shell Programming and Scripting
Hello,
I have a very large file of around 2 million records which has the following structure:
I have used the standard awk program to sort:
# wordfreq.awk --- print list of word frequencies
{
# remove punctuation
#gsub(/_]/, "", $0)
for (i = 1; i <= NF; i++)
freq++
}
END {
for (word... (3 Replies)
Discussion started by: gimley
3 Replies
LEARN ABOUT DEBIAN
disjointset
struct::disjointset(3tcl) Tcl Data Structures struct::disjointset(3tcl)
__________________________________________________________________________________________________________________________________________________
NAME
struct::disjointset - Disjoint set data structure
SYNOPSIS
package require Tcl 8.4
package require struct::disjointset ?1.0?
::struct::disjointset disjointsetName
disjointsetName option ?arg arg ...?
disjointsetName add-partition elements
disjointsetName partitions
disjointsetName num-partitions
disjointsetName equal a b
disjointsetName merge a b
disjointsetName find e
disjointsetName destroy
_________________________________________________________________
DESCRIPTION
This package provides disjoint sets. An alternative name for this kind of structure is merge-find.
Normally when dealing with sets and their elements the question is "Is this element E contained in this set S?", with both E and S known.
Here the question is "Which of several sets contains the element E?". I.e. while the element is known, the set is not, and we wish to find
it quickly. It is not quite the inverse of the original question, but close. Another operation which is often wanted is that of quickly
merging two sets into one, with the result still fast for finding elements. Hence the alternative term merge-find for this.
Why now is this named a disjoint-set ? Because another way of describing the whole situation is that we have
o a finite set S, containing
o a number of elements E, split into
o a set of partitions P. The latter term applies, because the intersection of each pair P, P' of partitions is empty, with the union
of all partitions covering the whole set.
o An alternative name for the partitions would be equvalence classes, and all elements in the same class are considered as equal.
Here is a pictorial representation of the concepts listed above:
+-----------------+ The outer lines are the boundaries of the set S.
| / | The inner regions delineated by the skewed lines
| * / * | are the partitions P. The *'s denote the elements
| * / | E in the set, each in a single partition, their
|* / | equivalence class.
| / * |
| / * / |
| * / * / |
| / / |
| / / * |
| / * |
| / * |
+-----------------+
For more information see http://en.wikipedia.org/wiki/Disjoint_set_data_structure.
API
The package exports a single command, ::struct::disjointset. All functionality provided here can be reached through a subcommand of this
command.
::struct::disjointset disjointsetName
Creates a new disjoint set object with an associated global Tcl command whose name is disjointsetName. This command may be used to
invoke various operations on the disjointset. It has the following general form:
disjointsetName option ?arg arg ...?
The option and the args determine the exact behavior of the command. The following commands are possible for disjointset
objects:
disjointsetName add-partition elements
Creates a new partition in specified disjoint set, and fills it with the values found in the set of elements. The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the elements are already part of the disjoint set and throws an
error otherwise.
The result of the command is the empty string.
disjointsetName partitions
Returns the set of partitions the named disjoint set currently consists of.
disjointsetName num-partitions
Returns the number of partitions the named disjoint set currently consists of.
disjointsetName equal a b
Determines if the two elements a and b of the disjoint set belong to the same partition. The result of the method is a boolean
value, True if the two elements are contained in the same partition, and False otherwise.
An error will be thrown if either a or b are not elements of the disjoint set.
disjointsetName merge a b
Determines the partitions the elements a and b are contained in and merges them into a single partition. If the two elements were
already contained in the same partition nothing will change.
The result of the method is the empty string.
disjointsetName find e
Returns the partition of the disjoint set which contains the element e.
disjointsetName destroy
Destroys the disjoint set object and all associated memory.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category struct
:: disjointset of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements
you may have for either package and/or documentation.
KEYWORDS
disjoint set, equivalence class, find, merge find, partition, partitioned set, union
CATEGORY
Data structures
struct 1.0 struct::disjointset(3tcl)