Solved

Creating RAMDRIVE on 2003 or 2008 Servers

Posted on 2009-03-30
33
2,609 Views
Last Modified: 2012-08-14
Hi all;
need API or script or code in DELPHI for creating a RAMDRIVE on Win2K3 or Win2K8.
It Doesnt matter if its FAT or NTFS
TIA
0
Comment
Question by:controlr
  • 12
  • 12
  • 6
  • +2
33 Comments
 
LVL 16

Expert Comment

by:speshalyst
Comment Utility
not sure about a script... but i stumbled upon this..
http://members.fortunecity.com/ramdisk/RAMDisk/ramdiskentlite.htm
 
0
 
LVL 16

Expert Comment

by:speshalyst
Comment Utility
0
 

Author Comment

by:controlr
Comment Utility
speshalyst,
Unfortunately it does not work on 2003/2008. or properly stated, i could not get that to work .  unless you know how where to call the ramdrive.sys at boot up ??
0
 
LVL 18

Expert Comment

by:Johnjces
Comment Utility
controlr

In the old Windows daze, one edited the config.sys file which should still under your root directory of 2003 and 2008.

You might try adding this line, with proper parameters and if allowed/available, to your config.sys and reboot.

device=c:\whateverpath\ramdisk.sys

John
0
 

Author Comment

by:controlr
Comment Utility
John, Did that, still no go (on both 2003 and 2008)
arrrg.
Is there a way to call the registration of the SYS on-the-fly ?
0
 
LVL 18

Expert Comment

by:Johnjces
Comment Utility
If you are using the one from Microsoft I do not think so since all of the configs are set in the registry. Change then reboot is the only way I see it.

Sorry I couldn't be of more help!

john
0
 

Accepted Solution

by:
controlr earned 0 total points
Comment Utility
Joahn, thanks anyhow!
 
I will look for API's and do it programatically, or make my own darn ramdrive program :)
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
@controlr

I've been following this thread for two days and wanted to know the context for your RAMdrive?  How is this to be used?

I have some thoughts on this subject, but don't want to waste anyone's time if you are going to close the discussion thread so quickly.
0
 

Author Comment

by:controlr
Comment Utility
Always happy to hear thoughts.
The idea is to un/register the ramdrive on-the-fly and not at boot time
 
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
What do you want to do with this RAM space?  

Will this be used by your application(s) or are you trying to make this space available to all running applications?

Does this space need to behave like a real drive while it is mounted?

Why RAM space instead of Hard Drive space?

What other considerations are there for this run-time space?

===============
Since we are having this discussion, I am stopping the automated closing process.
0
 

Author Comment

by:controlr
Comment Utility
i have software that must have fast file-like operations. this can not be achieved with hard disk as the data will be shared between other copmuters.
So having this on RAM will make operations much faster.
This of a database that is in RAM
if you have other ideas on how to make this available or VISIBLE just to my app, i will be happy to know the way
thx
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
kbmMemTable -- the best
http://www.components4programmers.com/products/kbmmemtable/index.htm

Delphi TMemStream class

Windows memory mapped file.  While you are using it, it is in RAM.

The protection of your data is best accomplished by encryption or by wiping the image on disk as your program is terminating.
0
 
LVL 18

Expert Comment

by:Johnjces
Comment Utility
Why not use an in memory database?

The JVCL (Jedi) has one and there are quite a few in memory databases, free and some for $$.

Do a search on torry or delphipages. That si what I would do. First I'd use the JVCL a worthy component set!

John
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
Good call John.

Also...Firebird/Interbase have imbedded databases as do other vendors (Advantage/Sybase, etc.).  I'm not sure if that is what you meant by "memory databases".

Depending on the size of your dataset, how you are using it, and how you are populating it, you might also be able to use the TClientDataset class.
0
 
LVL 18

Expert Comment

by:Johnjces
Comment Utility
aikimark

Sorry about posting a similar topic. Should doa refresh! In any event, an in memory db is the way to go IMHO.

John
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
@John

You had a very good suggestion that might well be necessary if there is some actual (relational or ISAM) database operations required.  I was thinking at a lower functional level that simply met the performance criteria.

I think we are in agreement that a RAMdisk is not an optimal solution and that there are several plug-in solutions that should be pursued.

==========================
@controlr

I'm still not sure why you don't just allocate the memory required to store the items within your application.  Delphi provides several convenient classes and many data structure options.  Some of these classes automatically allocate memory for you.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:controlr
Comment Utility
It would be very hard to access the files from remote computers if  its not a drive.
if you have suggestions - im happy to know
0
 
LVL 18

Expert Comment

by:Johnjces
Comment Utility
Can you stream this needed data to your clients using sockets? By using TServerSocket and a TCLientSocket? Or using Indy's similar TCP/IP components? It can be just as about fast.

John
0
 

Author Comment

by:controlr
Comment Utility
after 6 months of PRODUCTION with sockets, im walking away from it !!

you are welcome to close the thread
Cheers !
oris
0
 
LVL 18

Expert Comment

by:Johnjces
Comment Utility
Well then, good luck to you!

John
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
@controlr

Please tell us the details about your sharing requirements.  Before my first post in this discussion thread, I'd thought about TCP/IP.

It is possible to create a native Delphi application that looks like a web service to users and other programs.  That might be another option.
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
@controlr

"after 6 months of PRODUCTION with sockets, im walking away from it "
You are quitting waaaay too early.  Jonces and I are still gathering requirements from you.

Does this statment mean that you have already coded a solution using sockets but that it didn't behave well or just didn't work?
0
 

Author Comment

by:controlr
Comment Utility
as i said, the sockets are used in production environment, but the performance is sluggish to say the least.
And we did just what you came up with as the natural idea of TStreams and both TCP/UDP sockets (Indy as well)
 
unfortunately, we do not have the luxury to wait with this, as the sockets are wayy to slow.
In addtion - so you get the scope on how heavy duty this is.. think of multithreading on several ports, and badwidth is NOT out problem.
The best solution to date with streams has been with TMemoryStreams that we have altered a "little" to provide additional functionality.
BTW - with ramdrives (that we configured on bootup, performance is 3.7 times better,
As to the "why" - in our testing we noticed that the Tsockets are slow.
 Im trying to understand what information you are looking for, let me know
It looks like we are going off-topic here
Ori  
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
@controlr

Your question title was about a RAM drive with no context for why you need to do this nor why you might be trying to do this with Delphi.  But a RAMdrive isn't a foolproof solution in a multi-threaded/multi-user environment since it offers no protections against lockouts, deadly embraces, RACE conditions.

If you have a temporary solution, at least take the time to share the details of your environment so that we might supply you with the best advice.

1. Are multiple programs trying to access this data running on the same PC or different PCs?
2. Are these programs threaded?
3. What kind of data is this?
4. What lock mechanisms are in place?
5. How is this data manipulated by the application(s)?
6. What are the performance criteria? (volume, access frequency, etc.)

It only appears that we are 'off topic' because we are doing (requisite) analysis of your environment and problem, rather than giving you cookie-cutter answers to a problem we only partially understand.
0
 

Author Comment

by:controlr
Comment Utility
1. many PC's are accessing CONCURENTLY
2.All multithreaded
3.some binary, some ascii
4. Just locking between the threads
5. depending on data - some processes spawn new threads
6. speed of access first  then volume
 
to make the whole pictute look easier, think of the application as an SQL engine, and each computer "talks" with other computers on the network, some are servers and some are clients
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
6. I understand your priority.  What I meant by my question was how much data (broken down by binary and text) is sent to/from the different PCs (how many PCs).  I'm trying to get get a very accurate picture of the environment.   That was what I was trying to get across with my "arrival frequency" qualifier.

==================
If I understand correctly, you have written a central data-sharing application using Delphi that runs on a file server.  There is also some peer-to-peer communication between your nodes (of some unknown volume and type).  The problem you face is getting the data, or some portion thereof, back out to the PC nodes.

Please correct me if I am wrong.

==================
2. Are the node programs muli-threaded as well as the server application?  How many simultaneous connections are there from all the threads?

5. Let me clarify myself.  How is the central data accessed by the server application and the node applications?  I'm looking for specific information from you about Inserts, Updates, Deletions operations performed by the different programs.
0
 

Author Comment

by:controlr
Comment Utility
overall , you are right
6. there are about 100,000 clients and about 300 servers
2. Nodes  are multi-threaded as well, as they connect to several clients or servers
5. overall, there are 3 threads, 1 for inserts, 1 for updates/deletes and 1 for selects
In addition, there are more threads for selects as long as there in no locking issues.
 
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
6. Do the 300 servers do inserts, updates/deletes, and selects as well as the 100k clients?  Or is this RAMdisk running on the 300 servers (not the central server that I described)?  

How often do these clients interact with your central server?  If once a second, then you have a much larger environment than I originally thought.

7. Something confuses me about your RAMdisk 'solution'.  In order for this many clients to directly benefit, wouldn't they have to map to this (virtual) drive?

8. Do you need to persist any of this data when the central program terminates?
0
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
have you set the firewall/antivirus to exclude your program ?
this may help performance ...
0
 

Author Comment

by:controlr
Comment Utility
ofcourse! both hardware and software firewalls.
we even got an application accelerator hardware, the problem seems to be in the socket's READ procedure, we tried to modify the actual component, we also looked at the chillkat which was somewhat better., but still not as fast as ramdrive
As i said before, ramdrive seems to be the fasted (sor some reason), i know, i scratched my head as well about this! delphi was supposed to give me much better performance.
We also modified compile switches to make things faster.
Bottom line, ramdrive is fastest, we just need to get it working on-the-fly
This thread is now dead from my prespective
thanks for your help!
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
@controlr

Maybe your latest comment might be the key to our understanding of your problem.

9. How can a RAMdrive replace a socket read operation?

===========================
Generally speaking, a RAMdrive is a device that is instantiated when the system starts.  Unless you run your application in a virtual session on the server, then you must reboot the server in order to create your RAMdisk.  There is no on-the-fly creation.

"This thread is now dead from my prespective"
It seems you lack both the patience and the willingness to share details of your environment.  If you think your environment is trivial or even typical, you are grossly mistaken.  I've spent several days trying to get enough information from you to help you, but you've been fixated on RAMdisk and closing this discussion thread as quickly as possible, in the process cutting off one or more experts trying to help you.

You are welcome to close this question if you have truely given up (again).  Do NOT request that this question be deleted.

=========================
In my opinion, your application problem stems from design and implementation decisions -- architectural issues.  If you want a long term solution to your performance problem, then open a new question in which you state your problem with performance/throughput/data bottlenecks criteria, not a "how do I get X to work" question.

Be aware that there will need to be enough data coming from you to do the math.  For instance:
* Number of nodes on the LAN: 100,000
* Number of intermediary servers: 300
* Message arrival rates from the nodes:
  + x Inserts/min
  + y UpdDels/min
  + z Selects/min
  + zz application actions/min
* Message composition from nodes:
  + a% string messages (min size, max size, avg size, median size)
  + b% binary messages (min size, max size, avg size, median size)
* Message arrival rates from the intermediary servers:
  + x Inserts/min
  + y UpdDels/min
  + z Selects/min
  + zz application actions/min
* Message composition from intermediary servers:
  + a% string messages (min size, max size, avg size, median size)
  + b% binary messages (min size, max size, avg size, median size)
* central server application purpose detailed description
* what application processing is required for different types of messages
* what times you have recorded for the different message type processing
* what kind of hardware is the central server
* what kind of hardware is the intermediary nodes servers
* network configuration

While this may seem like a lot of work on your part, it is a small price to pay to get the great advice from these EE experts.  They aren't mushrooms.  You can't keep these experts in the dark (about the context and details of your problem) and expect them to flourish.
0
 

Author Comment

by:controlr
Comment Utility
9 - ramdrive is shared to all networked computers. and they can read/write directly to the drive.
As for the question, you are right, i was thinking the same thing, but as it stands,  the performance is different! perhaps there is undocumented API's that are used for sharing drives on a network or even a seperate layer (seperate layer is more probable).  We looked for a communication layer or API's on a networki and I wish i knew, cuz we would implement same layer/API's through delphi and create a stream over that "layer"
Please remember, we have this now on a fixed RAMDRIVE in PRODUCTION, and performance is GREAT!  so the problem can only be in the socket, and to be more refined -from what we have tested, its a delay in initiating a socket WRITE operation.
As for the assessment, its not a lot of work - we have all of the above numbers in real-time from out monitoring and logging systems, and its been taken care of and being reviewed monthly by our team of architects as well as semi annually by 7 outside independent bodies (4 of them have presence here on EE), so its not an issue.
thanks for taking the time, but as i can see from your direction, its NOT what im looking for. i see you are convinced the problem is in design and implementation, but as i tell from all the testing, that area is NOT the issue in this case.
This comment now closes my part on the thread. i will close it next week.
Again, thanks for all your input
ori
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
@controlr,

You are welcome to close this question.  If one of the RAMdrive posts was helpful, then accept that.  If not, then post a comment about what you were looking for that you didn't get solved by the posted comments and accept your own comment as the answer.

=======================
My parting thoughts on this for future readers of this thread:
* network file operations add another layer to TCP/IP I/O operations and should be SLOWER than a simple sockets solution
* the context and constraints for this problem were not supplied
* it is possible that the sockets solution that has been rejected did not perform sufficiently fast for several reasons that are unknown to us:
  - all I/O going to the same port
  - not persistent TCP/IP connections (i.e. dropped between I/O operations) introducing connection overhead with each message
  - not queued actions for each message
  - incorrect sockets settings
  - insufficient sockets resources
  - incorrect protocols for the types of messages
* a RAMdrive is a system (virtual) device and, as such, requires a system start
* a RAMdrive *could* be defined dynamically on a server if it ran in a virtual machine, such as HyperV or VMware.  Howerver, a virtual machine introduces another layer of overhead.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now