Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 05:33
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
HOSTNAME fixes ROX slowness problem - SOLVED
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Author Message
gcmartin


Joined: 14 Oct 2005
Posts: 4446
Location: Earth

PostPosted: Mon 01 Aug 2011, 14:44    Post_subject:  HOSTNAME fixes ROX slowness problem - SOLVED  

Many will find this complex. Many will find this complicated. Some will find it challedging, but together, I think this community can address this to a very High degree of resolution that will survive future Puppy and kernel upgrades. Externally, there appears to be a problem with Puppy design.

I expect that Objections will be heard within the community

This post is structured as follows;
  1. History of HOSTNAME
  2. History of the "hostname - ROX - "Puppy-Linux filesystem" problem
  3. Current status
  4. The Problem
  5. Request for community assistance
History of HOSTNAME
Without boring anyone, I wll summarize. Since the middle '70, ALL communications and later LAN administrators have been taught that they will never be two devices on the LAN with
  • same MAC
  • same hostname
  • same IP address
These identify the "machine-readable ID" as well as the "machine-readable name" of every device on the LAN. Every LAN technician who was ever taught by anyone, anywhere, knows to NOT make the mistake of duplicating this information on ANY two PC on a local LAN.in the same subnet.

These items, it is taught, is a standard that we are suppose to abhere to. And there are many very, very good reasons this is done. The standard says, "Every device will have a unique one of each of these."

Puppy/WARY have long been approaching the LAN as if it is the ONLY PC on the LAN, and that the Puppy PC will use its NIC to traverse the LAN to enter and use the internet.

Over the years, many of us have sort and used PUPs on our LAN where there are other PCs. Most recently, now, many of us are beginning to populate our LANs with multiple PUPs.

Even though the MAC are unique, the hostname(s) are NOT UNIQUE. And, in many cases they are the same for multiple Puppy devices on you LAN. This defies architectural standards defined and causes issues on the local PC and local LAN. Many non-PUP distros handle effectively.handled this problem with the hostname management withn their distros; namely Ubuntu, Fedora, Suse, etc.

In Puppy, this appears, that it was never revisited until fall,2010 when Shinobar step forward and began offering a solution that has been adopted by several distro developers here for other reasons, than the one we are discussing here.

History of the " 'hostname' - 'ROX' - 'Puppy-Linux filesystem' " problem
Almost simultaneous with Shinobar's solution, a discovery was made that there was a "LINK" to the /etc/hosts file contents and the behavior of the Puppy filesystem when using ROX. Seems that there is a slowness/delay in ROX behavior on the desktop when this file is NOT set properly. Again, Shinobar, enters the arena and upgrades his tool to overcome this delay problem by insuring that the hostname and the /etc/hosts contains the proper information which removes the delay/slowness we all had had for years with Puppy and ROX.

Now, as nice of a solution that Shinobar presents with the tool he developed for this community, if a savvy Linux user(s) did NOT use his tool, and tried to manually makes some needed changes to the system by modifying some key files or system variables, he runs the risk of filesystem things not working properly.

Current status
Today, no Puppy I have found is delivered with tools necessary to change "ALL" related system variables when the hostname is changed in the system. Nor, is there any directions for addressing how to get hte system to conform so that filesystem performance matches what an OTB filesystem provides in its ROX speed and performance.

The Problem:
In any Puppy system, the following PUPPY System data does NOT agree
when ANY changes to the following is necessary
  • hostname from the Linux hostname command
  • Linux Environment Variable HOSTNAME
  • files
    • /etc/hosts
    • /etc/hostname
Why is this a problem?
This is system data. And from time to time various application rely on getting authoritative data from the system's files and variables. This information should and must be kept consistent.
  1. All of these system items should agree when a user begins to use the Puppy desktop and wants to use his machine for ANY LAN operation
  2. All of these items should agree when a user has a need to change the system's hostname for ANY reason.
Important NOTE
It seems that when the fields agree, for some unknown reasons, ROX in PUPs seems to have superior performance than when these fields do NOT agree.

Request for community assistance
Would anyone, anyone share any thoughts on
  • why this dilemma exist in Puppy design?
  • what would be the "right" place for a solution to be for distro builders?
  • What should the solution look like?
  • What should be an acceptable Puppy methodolgy for changing the system hostname
  • when its necessary to do so?
I fully recognize that this topic is a little difficult for some to try to grasp what's going on, here, but many of the develpers in this community fully realize what's happening.

Please help all of us on this if you can.
P.S. PLEASE understand that the hostname may need to be changed when there is need after the system may have been running for awhile. We should expect that the system administrator can/will at any time change the system hostname to match LAN needs.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile

Edited_times_total
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3393
Location: Oregon

PostPosted: Mon 01 Aug 2011, 19:47    Post_subject:  

I have been with Puppy for a while, and with a local home lan with wireless as well as wired and Puppy on my main PC as well as on a few laptops that connect wirelessly, I can see that having a few PCs with the name "PuppyPC" could prove to be a problem.
Why can't one just implement startup code that asks what the user wants to name his PC?
It would then change all needed data accordingly.
A utility could also be added under networking to change the name later.

Also, my Lan keeps info for every PC that uses it for future connections.
I had to connect a laptop wired to set up a router.
When I later tried to connect the same laptop wirelessly, I had problems as the router assumed the laptop was still hardwired.
Back to top
View user's profile Send_private_message 
bigpup


Joined: 11 Oct 2009
Posts: 5392
Location: Charleston S.C. USA

PostPosted: Mon 01 Aug 2011, 22:36    Post_subject:  

In Lucid Puppy 5.2.5
Personalize Settings
Has option to change hostname
Doesn't this do what you are looking for?
personalize settings.jpg
 Description   
 Filesize   52.97 KB
 Viewed   2002 Time(s)

personalize settings.jpg


_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Tue 02 Aug 2011, 04:31    Post_subject:  

This maybe explain then why some people have problems with wifi set up?
If the router remember another setup with same hostname?

Just me wild guessing. I've only set up wifi with smartphones.

Quote:
the hostname may need to be changed when there is need after the system may have been running for awhile. We should expect that the system administrator can/will at any time change the system hostname to match LAN needs.


BigPup so in Pup 525 one go to that personal set up and change it then.

What does one do in other puppies?

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send_private_message 
Terryphi


Joined: 02 Jul 2008
Posts: 763
Location: West Wales, Britain.

PostPosted: Tue 02 Aug 2011, 04:46    Post_subject:  

gcmartin: I don't quite understand why this is a problem. I have 2 PCs on my LAN and my router knows them by the name of the user (e.g. Jack-PC and Jill-PC). On these PCs I can run any OS (Windows, various Puppy variants, Ubuntu and Linux Mint) with any hostname and they connect without problem. Does your router not allow you to rename attached devices?

Are you saying that Puppy works in a fundamentally different way from other Linux distros where changing the hostname is simply a matter of editing /etc/hosts and then everything just works on reboot?

Using a wireless network can be more complicated for the reason described above by 8-bit. How important is hostname anyway? Surely the router is only interested in the names of the attached devices (which can be changed within the router settings)?

_________________
Classic Opera 12.16 browser SFS package for Precise, Slacko, Racy, Wary, Lucid, Quirky, etc available here Smile
Back to top
View user's profile Send_private_message Visit_website 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Tue 02 Aug 2011, 05:30    Post_subject:  

Terry wrote
Quote:
Jack-PC and Jill-PC


As I get it some puppy automatically for to be able to boot give all "hosts" the same name puppypc

So I trust that is what gcmartin experienced and now him ask us for a solution to.

More modern versions like Puppy 5.2.5 does allow one to change that name before activating wifi?

But i don't trust that a noob would know one need to change that name.

I 've booted Puppy for some three years daily using it 24/7 and I've never once though about hostname and the word host I thought was only used by wmware and vbox.

I know from experience that internal hardisk can have a UUID Label?
but also have a human chosen label but I had no idea that one needed to name the pc as such.

I would bark loud if some software asked me to give that name and I would not know that it is named puppypc by default. I am that stupid

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send_private_message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Tue 02 Aug 2011, 05:59    Post_subject:  

gcmartin

I see your point and I propose a simple solution.

/etc/hosts and /etc/hostname are hard coded into the puppy iso. Therefore when when the environment variable $HOSTNAME is run it's going to be "puppypc" until a reboot. Environment variables are set up by the script /etc/profile at boot. At very first boot we need to run something that sets a new hostname before that is run.

Now, immediately before /etc/profile is run /etc/rc.d/rc.sysinit is run and that seems to depend on /etc/hostname's existence.

@ line 376 /etc/rc.d/rc.sysinit
Code:
hostname -F /etc/hostname


I propose that /etc/hostname and /etc/hosts should not exist hard coded in the iso but created with a random number:
Code:
if [ ! -f /etc/hostname ];then echo "puppypc${RANDOM}" > /etc/hostname
 PUPHOSTNAME=$(cat /etc/hostname)
  echo "127.0.0.1 localhost $PUPHOSTNAME
192.168.1.1 pc2
192.168.1.2 pc3
192.168.1.3 pc4" > /etc/hosts
fi

This assigns a random number appended to "puppypc" inserting it into /etc/hostname (if it doesn't already exist) and then creates a minimal /etc/hosts file. As long as this happens before line 376 in /etc/rc.d/rc.sysinit it should be sweet and our environment variable $HOSTNAME should be fine too.

Bear in mind this is untested, just off the top of my head but I have thought of this before as I have had issues with 2 puppy pc's on the LAN.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Tue 02 Aug 2011, 06:14    Post_subject:  

/etc/hostname is used to set kernel's hostname during system boot-up. The code is in rc.sysinit.
/etc/hosts is used to translate a name to an IP address.
They serve two different purposes and generally they don't have to match. But it's good to ensure that system's hostname is resolvable to an IP address.
In Fatdog64, during creation of the save file the system will ask you (optionally) change the default hostname ("fatdog64") to something else.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Tue 02 Aug 2011, 06:16    Post_subject:  

01micko wrote:

I propose that /etc/hostname and /etc/hosts should not exist hard coded in the iso but created with a random number:

Excellent suggestion !

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9260
Location: Stratford, Ontario

PostPosted: Tue 02 Aug 2011, 07:23    Post_subject:  

Correct me if I'm wrong, but the hostname is only important if the computer is running a service that advertises the name over your network. In how many Puppy situations does that occur? I can only think of one and it is easily resolvable.
Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Tue 02 Aug 2011, 08:02    Post_subject:  

rcrsn51 wrote:
Correct me if I'm wrong, but the hostname is only important if the computer is running a service that advertises the name over your network. In how many Puppy situations does that occur? I can only think of one and it is easily resolvable.

hostname uniqueness is important if the machine is to be accessible by its name over the network (basically, when the machine is acting as a server - web server, ftp server, nfs server, samba server (file sharing), etc).
But making hostname translate-able to IP address is important because some applications (apparently ROX included - though I don't understand why a file manager needs this) uses networking to connect to other components - even on the same machine. In this case, it is used only locally within the same machine, duplicate hostnames isn't a problem.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9260
Location: Stratford, Ontario

PostPosted: Tue 02 Aug 2011, 08:11    Post_subject:  

jamesbond wrote:
hostname uniqueness is important if the machine is to be accessible by its name over the network (basically, when the machine is acting as a server - web server, ftp server, nfs server, samba server (file sharing), etc).

That's certainly true for a Samba server. But do Puppy ftp and web servers broadcast their ID name? And if so, do they use the machine's hostname by default?

Seeing how people have been using Puppy networks for years where all the machines are named "puppypc", I am having trouble understanding the practical significance of this issue.
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9260
Location: Stratford, Ontario

PostPosted: Tue 02 Aug 2011, 08:27    Post_subject:  

01micko wrote:
I propose that /etc/hostname and /etc/hosts should not exist hard coded in the iso but created with a random number

Imagine a home network where each machine was running a Samba server identified by a random string of digits. How would you find anybody's shares?

You would still have to rename each machine to something meaningful, which is what you have to do now with "puppypc".

Edited_time_total
Back to top
View user's profile Send_private_message 
gcmartin


Joined: 14 Oct 2005
Posts: 4446
Location: Earth

PostPosted: Tue 02 Aug 2011, 13:02    Post_subject:  

This is indeed, a system level change requirement.

@01Micko proposes an acceptable solution for OTB Live media booting and beyond. This would create and preserve uniqueness for each and every use of the Live media boot process.

@JamesBond accurately indicates some cautions that should be understood and abhered to. The ROX problem is tied to the hostname, somewhere somehow and appears to maybe make use of couple of the 4 fields in its operation. When ROX is getting compatible information, processing speeds. When it doesn't, processing slows in its presentation on desktop.

@Rcrsn51 seems focused merely on SAMBA, yet I have repeated said ROX as well.

AND, how many of us know if there are other apps who would experience improved behavior it the Puppy system would be in agreement of these fields.

I believe that the correct approach is to have all the fields consistent for any internal system application's use. All internel applications should, at the very least, be seeing the system name consistently whenever they use any of these system fields, NOT as it is today. These are NOT application owned setting....these are system level settings.

So any solutions addressed will benefit all of us in our use of Puppy, internally for local applications and externally when the hostname is advertised appropriately.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send_private_message 
gcmartin


Joined: 14 Oct 2005
Posts: 4446
Location: Earth

PostPosted: Tue 02 Aug 2011, 13:19    Post_subject:  

@Terryphi, Thanks for asking. You are helping all of us to see the problem thru your questioning like this.
Terryphi wrote:
... I don't quite understand why this is a problem. ... Does your router not allow you to rename attached devices?
Routers do NOT change the hostname of PCs. All PCs can present their hostname and the router can registers that hostname. Its a problem because NO 2 PCs will have the same IP address, nor the same MAC address, nor the same Hostname. Its LAN architecture rules that we are suppose to follow.

Terryphi wrote:
Are you saying that Puppy works in a fundamentally different way from other Linux distros where changing the hostname is simply a matter of editing /etc/hosts and then everything just works on reboot?
Yes! Linux hostname changes are typically done using the Linux command "hostname". Puppy does this too, but the other system fields are not touched when the root user (administrator) uses the hostname command changes the system name. Some of the other Linux distros have solve this problem.

Terryphi wrote:
Using a wireless network can be more complicated for the reason described above by 8-bit. How important is hostname anyway? Surely the router is only interested in the names of the attached devices (which can be changed within the router settings)?
Your router is NOT concerned about hostname UNLESS it is doing DNS services for your local LAN. Most routers purchased from stores thruout the world do NOT provide that feature.

And yes, hostname is important if we are to continue to follow LAN architectural rules. We did NOT make the rules, but there are some very very good reasons why these kinds of rules exist...even on your loacl LAN.

Hope this helps

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1306s ][ Queries: 13 (0.0162s) ][ GZIP on ]