Programming :: Scaling Of Directory Entry Lookup?
Feb 28, 2011
I need to create and access a very large number of directories (and by large I mean millions). Each directory's name consists only of numbers, which are incremented every time a new directory is created (so there will be directory 1, 2, and so on).Of course I could just dump all these directories under the same parent directory, but I reckon I would run into filesystem limits. Moreover, I presume that entry lookup is not a O(1) operation, which means that lookup does not scale well.
One solution is to use some sort of prefix tree for storing the data. In this scheme, the data for directory "1234" would actually be stored in "/1/2/3/4".This solution has the advantage that each subtree never has more than 10 entries, but the disadvantage of requiring as many individual lookups as the length of the path.There are also intermediate solutions: using a maximum of 100 entries per directory, "1234" would become "/12/34", per example.In order to choose the best scheme, I must know more about the scalability of directory lookup under Linux. What's the maximum reasonable number of entries for a directory before lookup becomes too slow? Does someone know exactly what are the limitations of the algorithm used for directory lookup?
View 1 Replies
ADVERTISEMENT
Apr 1, 2011
I have the following error on one of my servers. Is there a way to tell which directory is exactly having the problem? if there is, if i delete that directory, will that resolve the problem or no?kernel: EXT2-fs error (device md(9,0)): ext2_check_page: bad entry in directory #10158084: unaligned directory entry - offset=0, inode=605471640, rec_len=7606, name_len=177
View 4 Replies
View Related
Sep 27, 2009
Reverse dns lookup in C?
View 3 Replies
View Related
Mar 13, 2009
Is there an easy to make an entry in /etc/exports to export a directory for every entry in /etc/hosts?
View 2 Replies
View Related
May 5, 2010
The *.dbf files (DBase III Plus files) have a header (metadata) and follow with n fixed records. I'd like to make a directory entry (like a symbolic link) that point to the fixed record area into a .dbf file. Is it possible in linux? The request is motivated by access a .dbf file from a Firebird SQL Database using CREATE TABLE EXTERNAL FILE '/tmp/mydbf.dbf' ( ... ); but this command only works on fixed records.
View 1 Replies
View Related
Jan 22, 2011
3.What /etc/exports entry would export a directory named /nfs to all clients on the subnet 192.168.10.0 and give them read-only access?
View 3 Replies
View Related
Oct 4, 2010
I have the following cron entry but it doesn't seem to be running:
Code:
The script does exist. And so does the directory /home/usr/log and writable. /var/log/syslog only has a bunch of these:
Code:
I don't see any file gets written to the log directory. That suggests to me that cron didn't run the job, as confirmed by /var/log/syslog.
View 9 Replies
View Related
May 2, 2011
I'm trying to make a program to simulate a parabolic movement, so i've added 2 entries, one for the initial velocity and other for the angle, anyway you probably don't care about that xD what i want is to take the number entered in the entry and put it in a variable to do the math, and then show everything in a dialog or something. how do i do that?
View 3 Replies
View Related
Dec 5, 2010
I have to add a new interrupt framework to the kernel (INT 81h). To add the interface descriptor to INT 81h I have to write to the IDT entry 81h. There are some functions of the kernel that can do this task but they can not be used in a module. So I will now do a patch to the kernel and don't know where to start.
Where is INT 80h interface descriptor written to the IDT? - So I could write it maybe the same way in the same function. Which GTD entry is used to write to the IDT (1, 2, 3 or ...) ? - So I can do some debugging.
View 1 Replies
View Related
Jun 13, 2009
I created a class which has to return an array. My problem is I need to return 3 entries per record for example:
Code:
array(
"2009-06-13", "John", "Doe";
"2009-06-13", "Paul", "Simon";
"2009-06-12", "Frank", "Herbert";
);
Can this be done? What is the syntax? Where is the documentation? If this can't be done, How would you return this to a class without using a DB?
View 3 Replies
View Related
May 1, 2011
I have a kernel module program which is used to create a entry in the proc file system. I have to read and write values in the entry. Its taken from a online tutorial stuff.how to write the value to the proc entry in the program ?
View 1 Replies
View Related
Jun 18, 2011
I've searched the web for quite a while and cannot seem to find a way to add a gtk.Entry() to a toolbar via toolbar.insert().
I currently have this:
Code:
Which in turn spits out "Gtk.Toolbar.insert() argument 1 must be gtk.ToolItem, not gtk.Entry"
How would I do this correctly?
View 2 Replies
View Related
Apr 13, 2011
i want to make program that processing entry in log on real time... I have try to pass "tail -f -n 1 /var/log/messages" command from .runtime().exec and process the output,, description of the algo is like this
-passed to exec()
-read output
-if not same as previous value procces it
but sometimes it loose some entry to procces, maybe it occur when proccesing another entry is added by system...
View 6 Replies
View Related
Jul 19, 2010
I have set up a MySQL database which has only three fields for user-name, password and index number. But there is a LOT of data (thousands of columns) which would take too long to enter manually. I'm sure MySQL must have a file format whereby a single large file containing different data types can be successfully automatically imported and the various data elements distributed to their intended fields. Does anyone know which characters MySQL uses as field seperators for this formatting of data, or is there a program already written which can take raw data and organize it into a SQL compatible file?
View 8 Replies
View Related
Jul 8, 2010
I was hoping to get some pointers on how to rename files based on database entry. I got hundreds of thousands of files that has GUID name assigned to it. only way to find out the file name is to look up the database table. Its obvious that this is not efficient. I couldn't find any tutorials on how to do this. Please point me to right direction. A starting point would be very helpful.
View 1 Replies
View Related
Sep 23, 2010
I am writing a sample nasm program via terminal.It's a basic one ,it only demonstrates the usage of the zero and sign flags and print relevant message to the output. Here are the code:
Code:
SECTION .data; data section
errMsg:db "Error !",10
errLen:equ $-errMsg
zeroMsg: db "Zero flag",10
zeroLen: equ $-zeroMsg
[Code]....
View 2 Replies
View Related
Nov 14, 2010
This is an odd one. I have a C program that calls umount to unmount a volume. A simplified case looks like this:
Code: int main()
{
int rc = umount2("/v0", MNT_FORCE);
if (rc != 0)
{
printf("Unable to unmount volume /v0, err='%s'", strerror(errno));
code....
I also discovered the reverse effect with calling mount() in code. When I make a call like Code: mount(drive, volume, "xfs", MS_NOATIME, NULL); the indicated drive is mounted since I can access the files as expected, but df doesn't show the drive has been mounted.
Why is my C code behaving this way? What do the mount/umount commands do when run from the command line that I'm not doing in my C code?
View 6 Replies
View Related
May 25, 2011
Ok, first is it possible to take a program I wrote and make it to be a entry in the right menu of a file browser program.
Also, can this happen if the program is developed in Java?
OpenSuSE 11.4
Kde 4
Dolphin(file browser)
View 8 Replies
View Related
May 15, 2010
[Code]....
Password: su: /bin/bash:/sbin: No such file or directory i cannot delete that entry from /etc/passwd as i cannot login as root.
View 11 Replies
View Related
Jan 3, 2009
After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).
View 4 Replies
View Related
Jul 1, 2010
I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.I have 64 bit Mint if that helps at all
View 3 Replies
View Related
Jan 26, 2011
Assume, I have the below LDAP entry
Code:
Which command should I use programmatically (in ldap.h) to change only ONE of the attributes above? say i only want to change the userPassword from value secret -> notasecret
Do we use?
Code:
And how?
View 1 Replies
View Related
Sep 7, 2010
I've been comparing the current Slackware 32 bit versus 64 bit, and I've noticed that the 64 bit version is as slow as dialup for domain name lookup.
The 32 bit version is very fast to find websites after a mouse click, whereas the 64 bit version takes forever looking up URLs. (using Firefox)
All the other 64 bit Linuxes seem to be the same way, not just Slackware.
The /etc/resolve.conf file is the same for 32 or 64 bit Slackware, but something is not right. The 32 bit version has a /etc/dhcpc directory, but not the 64 bit version.
Could this be causing the extreme slowdown?
It's really very irritating when the rest of the system is blazing fast.
AMD Phenom II X4 955
Asus M4A88TD-V
8 GB Corsair XM33 ram
View 7 Replies
View Related
Nov 14, 2010
There are millions of files in many directories. Wherenver i try rm * or find or use xargs, they say 'argument list too long' and exit. How can i deleted files in a directory with so many files without deleting the directory itself.
View 3 Replies
View Related
Oct 23, 2009
I have the following bind9 configuration, and I'm trying to resolve reverse lookup IP address to name.
$ttl 38400
mydomain.org.INSOAmyhosting.com. (
1243281304
10800
[code]...
** server can't find 1.2.3.4.in-addr.arpa: NXDOMAIN
Is my PTR wrong, or what do I need to have the reverse lookup working ?
Note: I replace real IP by 1.2.3.4, same for my domain name.
View 4 Replies
View Related
Jul 30, 2010
I have a problem in Eclipse for accessing update sites (for plugins). I am behind a NTLM proxy. Strangely, this proxy asks for a password while in Linux but not when in Windows�
To get around this annoying password issue, I already setup a working cntlmd proxy. I can use this proxy for mounting a remote DavFS2 share, for example. But the issue I have with Eclipse seems to involve proxy configuration. So I decided a transparent proxy could solve this issue. I installed tinyproxy on top of cntlmd, and added the following rule to the firewall:
Code:
iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to 8888
Now, I can configure Firefox for direct access to the Internet, and display a web site only if I give this web site's IP instead of its name! I surmise that it's because when configured for direct access, Firefox performs DNS lookups using the local (intranet) DNS, instead of squeezing its lookups through the proxy and accessing a broader DNS (I wonder which). How can I make all DNS lookups go transparently through the transparent proxy?
View 1 Replies
View Related
Oct 4, 2009
I have a file consisting of unique IP addresses - one per line I want to find the name of the host for each address. I tried the following:
Quote:
nslookup < file_name
This worked except it gives me a lot of extraneous information such as the servers providing the answers. This is too much information for me and would simply like each line of IP numbers to be replaced with a domain name. I tried using the same strategy using host and hostname and dig but I must have given the wrong command as I had no results.
View 3 Replies
View Related
Mar 31, 2010
I've been cracking on with getting a new Slackware 13 x64 installation going. I've got a problem with browsing the net which I can't put my finger on.
When I try to access a site my machine spends a long time with the "Looking up www.website.com" message at the bottom. It can take 7-12 seconds before the site is found. Normally I would blame this on my ISP or connection but Mint, Debian and Windows XP aren't having this problem, they just zip straight to the site whether I've been to it before or not.
Is anybody aware of where the problem might be? It's not in the browser either because Opera, Seamonkey and Firefox all have the same problem issue.
View 6 Replies
View Related
Jun 16, 2010
I am not entirely convinced that my CPU is actually changing frequency as it is meant to. It sometimes changes frequency, but most of the time it is stuck on 800MHz even when doing cpu intensive tasks. Here is information that may or may not be of help:
cat /proc/cpuinfo
processor: 0
vendor_id: GenuineIntel
[code]....
I notice here that it says between 800 and 800, but does that mean it is currently at 800, or can only be 800.
View 4 Replies
View Related
Jun 15, 2010
I want to be able to disable CPU scaling, whenever I want. The reason is that I run some timing tests, and I want the results to be reproducable (ie the CPU running at the same frequency). I have tried the following on 9.10 and 10.04 (both amd64). I use rcconfig to disable "on demand" (from [URL] but then when I use cpufreq-info tool I get:
[Code]...
View 9 Replies
View Related